1
我在python 2.7.3上使用pip install安裝了nltk
。當我運行這些命令使用Wordnet API與python 2.7.3時出現屬性錯誤
import nltk
from nltk.corpus import wordnet as wn
dog = wn.sysnet('dog.n.01')
我碰到下面的錯誤..
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\nltk\corpus\util.py", line 71, in __getattr__
return getattr(self, attr)
AttributeError: 'WordNetCorpusReader' object has no attribute 'sysnet'
我應該如何糾正?
哦!感謝您指出這一點......我多麼愚蠢! – 2013-04-25 21:09:49