日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2023/12/31 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 《textanalytics》课程简单总结(1):两种word relations——Paradigmatic vs. Syntagmatic... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

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...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。