我试图找到一种方法来从 NLTK 的 WordNet 中获取给定单词的定义。我尝试了以下代码,但出现错误,提示“WordNetCorpusReader”对象没有“定义”属性:
from nltk.corpus import wordnet definition = wordnet.definition('game') print(definition)
我试图查看许多书籍,但没有找到相关信息。
python nltk wordnet
nltk ×1
python ×1
wordnet ×1