WordNet是由Princeton 大学的心理学家,语言学家和计算机工程师联合设计的一种基于认知语言学的英语词典。
Wordnet的词汇结构包括九大类:上下位关系、蕴含关系、相似关系、成员部分关系、物质部分关系、部件部分关系、致使关系、相关动词关系、属性关系。
比如:
上义词:hypernyms,superordinate
下义词:hyponyms,subordinate
花(玫瑰花,牡丹花),其中花是上义词,玫瑰花和牡丹花是下义词。
synonym:同义词
polysemous:多义词,一词多义的。
meronymy:整体部分关系
glossary:词汇表,术语汇编。
synset:同义词集合
part of speech:词性。常常简写为POS。
如下图:
在wordnet中,每个词语(word)可能有多个不同的语义(sense),即一词多义;反过来,一个sense可能对应多个词,即一义多词。
对wordnet里面的内容举个例子:
(39) publish,print, – (put into print; “The newspaper published the news of the royal couple’s divorce”; “These news should not be printed”)
(14) publish, bring out, put out, issue, release – (prepare and issue for public distribution or sale; “publish a magazine or newspaper”)
(4) publish, write – (have (one’s written work) issued for publication; “How many books did Georges Simenon write?”; “She published 25 books during her long career”)
其中,
publish,print
publish, bring out, put out, issue, release
publish, write
上面表示3个lemma,即对publish来说,sense就这3种,不能再划分了。
39,14,4
表示publish以各种不同lemma出现的频次,这告诉我们publish通常都是print的意思。
针对wordnet的python使用,已经有了接口,只需要调用即可,这个接口的名字叫做NLTK
。如何使用可以参考:http://www.nltk.org/howto/wordnet.html。
下面是一个使用界面。
上面a
代表形容词,synset
代表代表同义词集合。
参考资料:
https://zhuanlan.zhihu.com/p/26461511
https://wenku.baidu.com/view/585b421efc4ffe473368ab37.html