방금 일부 품사 태그 사용을 시작했으며 많은 문제에 직면하고 있습니다. NLTK POS tagger에서 다운로드를 요청하는 것은 무엇입니까?
내가 POS는 다음과 같이 태그 시작 :import nltk
text=nltk.word_tokenize("We are going out.Just you and me.")
내가 'text'
를 인쇄 할 때 다음 상황이 발생합니다
print nltk.pos_tag(text)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "F:\Python26\lib\site-packages\nltk\tag\__init__.py", line 63, in pos_tag
tagger = nltk.data.load(_POS_TAGGER)
File "F:\Python26\lib\site-packages\nltk\data.py", line 594, in load
resource_val = pickle.load(_open(resource_url))
File "F:\Python26\lib\site-packages\nltk\data.py", line 673, in _open
return find(path).open()
File "F:\Python26\lib\site-packages\nltk\data.py", line 455, 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:
>>> nltk.download().
Searched in:
- 'C:\\Documents and Settings\\Administrator/nltk_data'
- 'C:\\nltk_data'
- 'D:\\nltk_data'
- 'E:\\nltk_data'
- 'F:\\Python26\\nltk_data'
- 'F:\\Python26\\lib\\nltk_data'
- 'C:\\Documents and Settings\\Administrator\\Application Data\\nltk_data'
나는
nltk.download()
를 사용했지만 작동하지 않았다.
왜 모든 텍스트를 굵게 쓰고 있습니까? 이것은 실제로 필요하지 않습니다. 또한 오류를 나타내는 최소한이지만 완전한 예제를 게시하십시오. –
거기, 나는 너를 위해 그것을 청소했다. 향후 질문의 형식을 지정하는 방법에 대한 예를 들어 보시기 바랍니다. –
감사합니다 ... 문제가 해결되었습니다 ... – Pearl