[英]How to use WordNet similarity perl modules in Python?
I want to use perl modules from WordNet::Similarity package to calculate semantic relatedness(Hirst-St Onge, Lexical chains, etc.) between texts. 我想使用WordNet :: Similarity包中的perl模块来计算文本之间的语义相关性(Hirst-St Onge,词法链等)。 Does anybody have idea about how to use them in python?
有人知道如何在python中使用它们吗?
You need to use nltk.wordnet.corpus. 您需要使用nltk.wordnet.corpus。 You should have a synset method available that will return what you need.
您应该有一个可用的synset方法,该方法将返回所需的内容。 Basically the wordnet corpus from nltk offers: words, synsets, lemmas, verb frames, similarity etc. You can check the extensive howto for nltk for code and approach samples.
基本上,nltk的wordnet语料库提供:单词,同义词集,引理,动词框架,相似性等。您可以查看有关nltk的广泛方法手册,以获取代码和方法样本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.