码迷,mamicode.com
首页 > 其他好文 > 详细

《textanalytics》课程简单总结(1):两种word relations——Paradigmatic vs. Syntagmatic

时间:2015-07-18 12:39:16      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:

coursera上的公开课《https://www.coursera.org/course/textanalytics》系列,讲的非常不错哦。


1、两种关系:Paradigmatic vs. Syntagmatic(聚合和组合)

? Paradigmatic:  A & B have paradigmatic relation if they can be substituted for each other (i.e., A & B are in the same class) 
– E.g., “cat” and “dog”; “Monday” and “Tuesday” (聚合:同一类别的,high similar context)
? Syntagmatic: A & B have syntagmatic relation if they can be combined with each other (i.e., A & B are related semantically) 
– E.g., “cat” and “sit”;  “car” and “drive”(组合:常在一起出现的,high correlated occurrences  but relatively low individual occurrences)

技术分享

技术分享


2、挖掘Paradigmatic(聚合)关系:

2.1、如何挖掘两个词(例如dog和cat)的聚合关系强不强?

因为聚合关系本质上反映的是context similarity,所以我们可以首先获取所有文档中出现dog、cat的句子的context,dog左边一个词的context、dog右边一个词的context,例如:Left1(“cat”) = {“my”, “his”, “big”, “a”, “the”,…},Right1(“cat”) = {“eats”, “ate”, “is”, “has”, ….},Window(“cat”)  =   {“my”, “his”, “big”,  “eats”,  “fish”, …};同理可获得Left1(“dog”) 、Right1(“dog”)、Window(“dog”) 的context;这样,我们就可以通过计算Sim(“Cat”,  “Dog”) = Sim(Left1(“cat”), Left1(“dog”)) + Sim(Right1(“cat”), Right1(“dog”)) +  … + Sim(Window(“cat”), Window(“dog”))的大小来表示这两个词之间的聚合关系的强弱了。。。。

2.2具体到计算,常用的办法是Bag of Words,也就是Vector Space Model (VSM),需要解决两个问题:

1)如何计算每一个向量,即把Left1(“cat”) = {“my”, “his”, “big”, “a”, “the”,…}转化为vectorLeft1 = {3, 5, 8, 2, 7, ...}等VSM可用的形式。

2)如何计算Sim(x1, x2)。

解决这两个问题的一般性办法:Expected Overlap of Words in Context (EOWC):

d1=(x1, …xN) ,其中xi =count(wi,d1)/|d1| (从文档d1中随机选一个词,是wi的概率

d2=(y1, …yN) ,其中yi =count(wi,d2)/|d2| (从文档d2中随机选一个词,是wi的概率

Sim(d1,d2)=d1.d2= x1y1+...+xnyn(分别从d1、d2中随机选一个词,两个词一样的概率)

EOWC有两个主要问题:

– It favors matching one frequent term very well over matching more distinct terms.  ——通过平滑TF实现

情况1,d1、d2中的w1都非常频繁,其他wi却几乎不匹配,此时Sim(d1,d2)=10*10+0*0+...+1*3=123;情况2,d1、d2中的每个wi都不是非常频繁,但几乎都出现了几次,此时Sim(d1,d2)=5*5+4*3+...+2*6=111对于这两种情况,EOWC是无法区分的,而我们更倾向于情况2代表的相似度!
– It treats every word equally (overlap on “the” isn’t as so meaningful as overlap on “eats”). ——通过IDF实现

通过平滑TF:BM25 Transformation

技术分享

通过IDF:IDF Weighting

技术分享

最终表达式:

技术分享

-----

技术分享


3、挖掘Syntagmatic(组合)关系:

参考下一篇博客:。

版权声明:本文为博主原创文章,未经博主允许不得转载。

《textanalytics》课程简单总结(1):两种word relations——Paradigmatic vs. Syntagmatic

标签:

原文地址:http://blog.csdn.net/mmc2015/article/details/46940373

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!