2013-05-05 22 views
0

在NLTK senseval模塊,感測的形式爲HARD1HARD2等(見源here)。但是,似乎沒有辦法獲得實際的定義。我試圖實現萊斯克算法,現在我試圖檢查萊斯克算法預測的意義是否正確(使用WordNet中的定義)。如何在NLTK的senseval模塊中獲得感覺的定義?

我遇到的問題是如何統一WordNet定義與senseval答案(HARD1,HARD2)。有人知道如何將SENSEVAL的含義轉化爲定義,或者在某處查找它?

回答

0

我最終找到了這些對應於WordNet的1.7,這是非常陳舊的感覺(好像沒有在Mac OS X或Ubuntu 11.04易於安裝)。

有共發現1.7的無在線版本,我能找到。

此網站還有關於這三個語料庫的一些有用的信息。例如,它說interest的六種感官來自朗文英語在線詞典(大約在2001年)。見here

它描述的硬來源,共發現1.7。

最後,我結束了手動映射的定義中的那些WordNet的3.0。如果你有興趣,這是字典。但是請注意,我不是在語言學方面的專家,而且他們不準確

# A map of SENSEVAL senses to WordNet 3.0 senses. 
# SENSEVAL-2 uses WordNet 1.7, which is no longer installable on most modern 
# machines and is not the version that the NLTK comes with. 
# As a consequence, we have to manually map the following 
# senses to their equivalent(s). 
SV_SENSE_MAP = { 
    "HARD1": ["difficult.a.01"], # not easy, requiring great physical or mental 
    "HARD2": ["hard.a.02",   # dispassionate 
       "difficult.a.01"], 
    "HARD3": ["hard.a.03"],   # resisting weight or pressure 
    "interest_1": ["interest.n.01"], # readiness to give attention 
    "interest_2": ["interest.n.03"], # quality of causing attention to be given to 
    "interest_3": ["pastime.n.01"], # activity, etc. that one gives attention to 
    "interest_4": ["sake.n.01"],  # advantage, advancement or favor 
    "interest_5": ["interest.n.05"], # a share in a company or business 
    "interest_6": ["interest.n.04"], # money paid for the use of money 
    "cord": ["line.n.18"],   # something (as a cord or rope) that is long and thin and flexible 
    "formation": ["line.n.01","line.n.03"], # a formation of people or things one beside another 
    "text": ["line.n.05"],     # text consisting of a row of words written across a page or computer screen 
    "phone": ["telephone_line.n.02"], # a telephone connection 
    "product": ["line.n.22"],  # a particular kind of product or merchandise 
    "division": ["line.n.29"],  # a conceptual separation or distinction 
    "SERVE12": ["serve.v.02"],  # do duty or hold offices; serve in a specific function 
    "SERVE10": ["serve.v.06"], # provide (usually but not necessarily food) 
    "SERVE2": ["serve.v.01"],  # serve a purpose, role, or function 
    "SERVE6": ["service.v.01"]  # be used by; as of a utility 
} 
相關問題