문제

If I try this :

import nltk
text = nltk.word_tokenize("And now for something completely different")
nltk.pos_tag(text)

Output:

Traceback (most recent call last):
File "C:/Python27/pos.py", line 3, in <module>
nltk.pos_tag(text)
File "C:\Python27\lib\site-packages\nltk-2.0.4-py2.7.egg\nltk\tag\__init__.py" ipos_tag
tagger = load(_POS_TAGGER)
File "C:\Python27\lib\site-packages\nltk-2.0.4-py2.7.egg\nltk\data.py", line 605,in 
resource_val = pickle.load(_open(resource_url))
ImportError: No module named numpy.core.multiarray
도움이 되었습니까?

해결책

It seems that the saved word tokenizer requires numpy. You'll need to install it.

다른 팁

Install numpy using the command:

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