Skip to main content
 首页 » 编程设计

python之wn.synset ('whale.n.01' ) 返回错误的同义词集

2024年11月01日7davidwang456

print(wn.synset('whale.n.01')) 

此代码打印:

Synset('giant.n.04') 

我有 from nltk.corpus import wordnet as wn。其他一切正常。

请您参考如下方法:

whale有两种意义,'whale.n.02'是哺乳动物。参见下面来自 wordnet 在线演示 http://wordnetweb.princeton.edu/perl/webwn