avatar
m(- -)m 求解算法# Database - 数据库
Y*n
1
两组excel数据, 组a有两列数据, standard vendor name, vendor code; 大约
10000多行 ;组b有一列数据, vendor name, 大约有300多行; 现在我想JO
IN这俩个table...但是不能够用 a. standard vendor name = b.vendor name, 因为
我想让两个string大约相同就可以. 比如a的 general electrical
corporation 应该约等于 b 的general electrical co...就是有一点人工智能的意思
...
这个是不是可以用vba实现? sql好像不可能?
拜谢 m(- -)m
avatar
c*e
2
哪有这么人工智能的东西.常见的比如地址,人名的match,都是很头疼的问题

【在 Y*******n 的大作中提到】
: 两组excel数据, 组a有两列数据, standard vendor name, vendor code; 大约
: 10000多行 ;组b有一列数据, vendor name, 大约有300多行; 现在我想JO
: IN这俩个table...但是不能够用 a. standard vendor name = b.vendor name, 因为
: 我想让两个string大约相同就可以. 比如a的 general electrical
: corporation 应该约等于 b 的general electrical co...就是有一点人工智能的意思
: ...
: 这个是不是可以用vba实现? sql好像不可能?
: 拜谢 m(- -)m

avatar
s*d
3
你这个恐怕很难,除非你自己弄一个list。
如果你做fuzzy regex, 说不定一个叫generic electrical co
的又match你的。
avatar
Y*n
4
啊呀, 我听说过fuzzy regex, 能不能举个例子?
list就是说, 自己预先hard code那些可模糊match的, 比如, co.
= company, co. = corporation, & = and, etc..?
的确, 我宁可错过real match, 也不要false match...

【在 s**********d 的大作中提到】
: 你这个恐怕很难,除非你自己弄一个list。
: 如果你做fuzzy regex, 说不定一个叫generic electrical co
: 的又match你的。

avatar
B*7
5
I am not a database man, but have some excel tricks from b-school.
The data needs clean-up. For this case, I would create a new column to both
tables to stardardize all the names of the companies, i.e., replace all the
company* with co.,etc.
it could be tough to "wash" the data. At B school, we always spent 50%+
project time on this.
Hope it will work. Let me know if you want to discuss more.
avatar
m*5
6
用sas很容易解决
如果你非得用excel
我google了一下,你看这个行不行
http://www.mrexcel.com/pc07.shtml

【在 Y*******n 的大作中提到】
: 两组excel数据, 组a有两列数据, standard vendor name, vendor code; 大约
: 10000多行 ;组b有一列数据, vendor name, 大约有300多行; 现在我想JO
: IN这俩个table...但是不能够用 a. standard vendor name = b.vendor name, 因为
: 我想让两个string大约相同就可以. 比如a的 general electrical
: corporation 应该约等于 b 的general electrical co...就是有一点人工智能的意思
: ...
: 这个是不是可以用vba实现? sql好像不可能?
: 拜谢 m(- -)m

avatar
H*g
7
用sas怎么解决?最近做个类似的project
thanks

【在 m********5 的大作中提到】
: 用sas很容易解决
: 如果你非得用excel
: 我google了一下,你看这个行不行
: http://www.mrexcel.com/pc07.shtml

avatar
Y*n
8
我的天, 好多方案...看齐来挺牛的...你怎么google的?

【在 m********5 的大作中提到】
: 用sas很容易解决
: 如果你非得用excel
: 我google了一下,你看这个行不行
: http://www.mrexcel.com/pc07.shtml

avatar
m*5
9
我已经给你回信了
希望有帮助

【在 H**********g 的大作中提到】
: 用sas怎么解决?最近做个类似的project
: thanks

avatar
m*5
10
妖后啊
你要增强research 能力啊
fuzzy match excel

【在 Y*******n 的大作中提到】
: 我的天, 好多方案...看齐来挺牛的...你怎么google的?
avatar
Y*n
11
老板同意给我装sas了...我也要你的sas方案!
avatar
m*5
12
比如说match两个company name variables
就叫他们iname comnam好了
我一般create一个variable计算两个name variables之间的distance
name_dist=min(spedis(iname,comnam),spedis(comnam,iname));
一般name_dist<30就并的不错了
数字越小,并的越好
还有一些很复杂的fuzzy match方法
但是都需要写一些小macro程序
name我一般不用做 unique identifier
所以这个方法作为补充就还不错了

【在 Y*******n 的大作中提到】
: 老板同意给我装sas了...我也要你的sas方案!
avatar
Y*n
13
heee heeeee...:P

【在 m********5 的大作中提到】
: 妖后啊
: 你要增强research 能力啊
: fuzzy match excel

avatar
B*g
14
1. download sql server expression 2008 and install it
2. load 2 files to db
3. standardize a and b (like company to co.)
4. read http://msdn.microsoft.com/en-us/library/ms142571.aspx
5. fa ba ozi

【在 Y*******n 的大作中提到】
: 两组excel数据, 组a有两列数据, standard vendor name, vendor code; 大约
: 10000多行 ;组b有一列数据, vendor name, 大约有300多行; 现在我想JO
: IN这俩个table...但是不能够用 a. standard vendor name = b.vendor name, 因为
: 我想让两个string大约相同就可以. 比如a的 general electrical
: corporation 应该约等于 b 的general electrical co...就是有一点人工智能的意思
: ...
: 这个是不是可以用vba实现? sql好像不可能?
: 拜谢 m(- -)m

avatar
Y*n
15
并的越好...就是match的越精确的意思?
好棒啊...这么incapsulated的function...嘿黑...

【在 m********5 的大作中提到】
: 比如说match两个company name variables
: 就叫他们iname comnam好了
: 我一般create一个variable计算两个name variables之间的distance
: name_dist=min(spedis(iname,comnam),spedis(comnam,iname));
: 一般name_dist<30就并的不错了
: 数字越小,并的越好
: 还有一些很复杂的fuzzy match方法
: 但是都需要写一些小macro程序
: name我一般不用做 unique identifier
: 所以这个方法作为补充就还不错了

avatar
Y*n
16
这个是纯数据库solution啊...妈呀....看来我也要学习以下....
包子大大的有...接着!

【在 B*****g 的大作中提到】
: 1. download sql server expression 2008 and install it
: 2. load 2 files to db
: 3. standardize a and b (like company to co.)
: 4. read http://msdn.microsoft.com/en-us/library/ms142571.aspx
: 5. fa ba ozi

avatar
m*5
17

你也给我发点包子吧
hoho

【在 Y*******n 的大作中提到】
: 并的越好...就是match的越精确的意思?
: 好棒啊...这么incapsulated的function...嘿黑...

avatar
B*g
18
地址,人名 are much more easier.
地址: buy software can standardize address based on usps db, my company use
code1
人名: soundex is enough

【在 c*******e 的大作中提到】
: 哪有这么人工智能的东西.常见的比如地址,人名的match,都是很头疼的问题
avatar
m*5
19
是不是那些CSR都用的 soundex
还要发音准啊
每次都match不上-_-

use

【在 B*****g 的大作中提到】
: 地址,人名 are much more easier.
: 地址: buy software can standardize address based on usps db, my company use
: code1
: 人名: soundex is enough

avatar
B*g
20
chi bao zi.

【在 Y*******n 的大作中提到】
: 这个是纯数据库solution啊...妈呀....看来我也要学习以下....
: 包子大大的有...接着!

avatar
Y*n
21
当然! 以为你不在乎包子, 光在乎奔片涅...哈哈..

【在 m********5 的大作中提到】
: 恩
: 你也给我发点包子吧
: hoho

avatar
m*5
22
你要是也奔一个
那就更赞了

【在 Y*******n 的大作中提到】
: 当然! 以为你不在乎包子, 光在乎奔片涅...哈哈..
avatar
Y*n
23
等着我把这个问题解决了...回fashion版去疯一疯...

【在 m********5 的大作中提到】
: 你要是也奔一个
: 那就更赞了

avatar
s*d
24

做了这部用vba几行就把剩下的做了,何必又这个database又那个
sas的。

【在 B*****g 的大作中提到】
: chi bao zi.
avatar
w*r
25
我写过类似的东西,用java store proc in oracle实现了string distance/soundex(
phonetic
index)/synonyms的比对,然后分别取一个best fitting linear regression就解决了

【在 Y*******n 的大作中提到】
: 两组excel数据, 组a有两列数据, standard vendor name, vendor code; 大约
: 10000多行 ;组b有一列数据, vendor name, 大约有300多行; 现在我想JO
: IN这俩个table...但是不能够用 a. standard vendor name = b.vendor name, 因为
: 我想让两个string大约相同就可以. 比如a的 general electrical
: corporation 应该约等于 b 的general electrical co...就是有一点人工智能的意思
: ...
: 这个是不是可以用vba实现? sql好像不可能?
: 拜谢 m(- -)m

avatar
z*3
26
first use Q-Gram, then evaluate Jacarrd Distance. Finally define an
appropriate threshold to extract match.
avatar
z*3
27
bao zi....
avatar
B*t
28
感觉这个最靠谱
所谓智能的,还得自己写。
这个synonyms怎么实现的?

【在 w*r 的大作中提到】
: 我写过类似的东西,用java store proc in oracle实现了string distance/soundex(
: phonetic
: index)/synonyms的比对,然后分别取一个best fitting linear regression就解决了

avatar
w*r
29
synonym is achieved by getting paring A/B B/A in a table, the data source is
google , there were a lot of list of common synonyms for American first
names/common abb for addresses/common abb for business names if you google
it. The rest is compile them and load them into a 2 column table.
avatar
w*r
30
em.. total cost is 3 weeks. about 60% of my time at work.

is

【在 w*r 的大作中提到】
: synonym is achieved by getting paring A/B B/A in a table, the data source is
: google , there were a lot of list of common synonyms for American first
: names/common abb for addresses/common abb for business names if you google
: it. The rest is compile them and load them into a 2 column table.

avatar
Y*n
31
我的天...这个好像非常强大, 可以run超级大数据库吧...我只学习了java10
1....stored procedure也很神秘的说....
mm我们认识以下吧...

【在 w*r 的大作中提到】
: 我写过类似的东西,用java store proc in oracle实现了string distance/soundex(
: phonetic
: index)/synonyms的比对,然后分别取一个best fitting linear regression就解决了

avatar
B*g
32
can you post this several lines?

【在 s**********d 的大作中提到】
:
: 做了这部用vba几行就把剩下的做了,何必又这个database又那个
: sas的。

avatar
B*g
33
do you read the link I posted?

【在 Y*******n 的大作中提到】
: 我的天...这个好像非常强大, 可以run超级大数据库吧...我只学习了java10
: 1....stored procedure也很神秘的说....
: mm我们认识以下吧...

avatar
Y*n
34
还没有呢...刚刚把第一个方案excel读了以下, musher妹妹回给我做题的.
..我读完了那个, 再看你的...说实话, 都不太懂怎么,去哪里download...你
别生气, 我肯定回读的...到时候你别嫌我烦啊...

【在 B*****g 的大作中提到】
: do you read the link I posted?
avatar
B*t
35
赞一个!
看来synonyms是没啥捷径的。
这要看楼主原始数据了,如果有microsoft 和 MS 这类的比较,也只有这个办法了吧。

is

【在 w*r 的大作中提到】
: synonym is achieved by getting paring A/B B/A in a table, the data source is
: google , there were a lot of list of common synonyms for American first
: names/common abb for addresses/common abb for business names if you google
: it. The rest is compile them and load them into a 2 column table.

avatar
m*5
36
刚看到你给我发的文件了
我晕死
你先处理一下你的data
你给我按照这样的格式处理
NameVariable1 NameVariable2
A1 B1
A2 B2
..... .....
不对应不要紧
但你别有的两列,有的一列,搞不清楚你这什么排列组合啊

的.

【在 Y*******n 的大作中提到】
: 还没有呢...刚刚把第一个方案excel读了以下, musher妹妹回给我做题的.
: ..我读完了那个, 再看你的...说实话, 都不太懂怎么,去哪里download...你
: 别生气, 我肯定回读的...到时候你别嫌我烦啊...

avatar
Y*n
37
哭...那个我手动改回去了...一定是text to column那个破东西没有disable,
所以又给返回原样了...也可能我没有save change? 非常对不起...我给你
重新发...
问题: 你觉得能够handle这些pattern difference么?

【在 m********5 的大作中提到】
: 刚看到你给我发的文件了
: 我晕死
: 你先处理一下你的data
: 你给我按照这样的格式处理
: NameVariable1 NameVariable2
: A1 B1
: A2 B2
: ..... .....
: 不对应不要紧
: 但你别有的两列,有的一列,搞不清楚你这什么排列组合啊

avatar
B*g
38
this is based on companies are big companies.
We do similar thing match name/taxid/address, if not match, send to manual
match interface. Top N suggestion will be there for manual choose.
all those caused by "qin shi huang", he should make all those uniform long
time ago.

【在 B****t 的大作中提到】
: 赞一个!
: 看来synonyms是没啥捷径的。
: 这要看楼主原始数据了,如果有microsoft 和 MS 这类的比较,也只有这个办法了吧。
:
: is

avatar
m*5
39
先让我理解一下你的data
现在的我完全没看明白

,

【在 Y*******n 的大作中提到】
: 哭...那个我手动改回去了...一定是text to column那个破东西没有disable,
: 所以又给返回原样了...也可能我没有save change? 非常对不起...我给你
: 重新发...
: 问题: 你觉得能够handle这些pattern difference么?

avatar
w*r
40
synonym没有捷径,再聪明的算法也不会知道William和James是一个名字,所以
synonym的字典要建好,在人名处理的时候有一个好处就是男名和女名可以打标识,
所以结了婚改last name的,不会从string distance里面跳出来,直接被名字
的性别给supress了。
quick reference for soundex algorithms in java:
http://commons.apache.org/codec/userguide.html
check wikipedia, it should have implementation in C++ and
other languages

【在 B****t 的大作中提到】
: 赞一个!
: 看来synonyms是没啥捷径的。
: 这要看楼主原始数据了,如果有microsoft 和 MS 这类的比较,也只有这个办法了吧。
:
: is

avatar
r*n
41
why not try wildcard chars or regular expression (vba.net & c# both includes
regex), or you can use perl's regex function + database package
avatar
B*g
42
sigh,就一万个手动把。

【在 w*r 的大作中提到】
: synonym没有捷径,再聪明的算法也不会知道William和James是一个名字,所以
: synonym的字典要建好,在人名处理的时候有一个好处就是男名和女名可以打标识,
: 所以结了婚改last name的,不会从string distance里面跳出来,直接被名字
: 的性别给supress了。
: quick reference for soundex algorithms in java:
: http://commons.apache.org/codec/userguide.html
: check wikipedia, it should have implementation in C++ and
: other languages

avatar
B*g
43
不够用。

includes

【在 r********n 的大作中提到】
: why not try wildcard chars or regular expression (vba.net & c# both includes
: regex), or you can use perl's regex function + database package

avatar
f*e
44
要那么多包子干嘛。
不怕吃成胖妞呀。

【在 B*****g 的大作中提到】
: 1. download sql server expression 2008 and install it
: 2. load 2 files to db
: 3. standardize a and b (like company to co.)
: 4. read http://msdn.microsoft.com/en-us/library/ms142571.aspx
: 5. fa ba ozi

avatar
s*e
45
掺乎一下。
写程序对公司名用某个地图服务器进行地址搜索(LAT/LONG),然后再匹配。哈哈
avatar
s*d
46

你这个就不用想别人给你的主意怎么fuzzy match了。除了网上找常用
的缩写,剩下的就是自己hard code了。另外加一些clean up让string
规范一些。
只要你做fuzzy match,就不能保证没有false match。

【在 Y*******n 的大作中提到】
: 哭...那个我手动改回去了...一定是text to column那个破东西没有disable,
: 所以又给返回原样了...也可能我没有save change? 非常对不起...我给你
: 重新发...
: 问题: 你觉得能够handle这些pattern difference么?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。