Skip to main content
 首页 » 编程设计

带有 WordNet 2.1 的 Python 3 和 NLTK之这可能吗

2025年05月04日9lonelyxmas

我将 Python 3 和 NLTK 3.0.0 与 WordNet 3.0 结合使用。

我想使用 this data (semeval2007)使用 WordNet 2.1。

是否可以将 WordNet 2.1 与 Python 3 一起使用?

是否可以用 WordNet 2.1 替换 WordNet 3.0?我该怎么做?

请您参考如下方法:

您可以使用 WordNetCorpusReader 加载特定版本的 wordnet。

from nltk.corpus import WordNetCorpusReader 
 
wn2 = WordNetCorpusReader("WordNet-2.0/dict", nltk.data.find("WordNet-2.0/dict")) 
 
print wn2.get_version()