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
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