문제

I installed nltk using pip install on python 2.7.3. When I run these commands

import nltk
from nltk.corpus import wordnet as wn
dog = wn.sysnet('dog.n.01')

I get the following error ..

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'

How should I correct it ?

도움이 되었습니까?

해결책

I think you want word.synset, not word.sysnet

nltk documentation for synset.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top