我試圖使用語音在NLTK標記,並使用這個命令:NLTK pos_tag使用
>>> text = nltk.word_tokenize("And now for something completely different")
>>> nltk.pos_tag(text)
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
nltk.pos_tag(text)
File "C:\Python27\lib\site-packages\nltk\tag\__init__.py", line 99, in pos_tag
tagger = load(_POS_TAGGER)
File "C:\Python27\lib\site-packages\nltk\data.py", line 605, in load
resource_val = pickle.load(_open(resource_url))
File "C:\Python27\lib\site-packages\nltk\data.py", line 686, in _open
return find(path).open()
File "C:\Python27\lib\site-packages\nltk\data.py", line 467, in find
raise LookupError(resource_not_found)
LookupError:
**********************************************************************
Resource 'taggers/maxent_treebank_pos_tagger/english.pickle' not
found. Please use the NLTK Downloader to obtain the resource:
不過,我得到一個錯誤信息,顯示:
engish.pickle not found.
我有下載整語料庫和英語.pickle文件是在那裏maxtent_treebank_pos_tagger
我能做些什麼來得到這個工作?
歡迎來到SO。儘量在問題中儘可能描述以獲得最佳答案。 – simonmorley