1
我想使用NLTK POS-tagger,但得到「zipfile.BadZipfile:文件不是zip文件」錯誤。使用nltk pos tagger時出現錯誤的zip文件錯誤
誤差來源於此代碼:
import nltk
sentence = "I love python"
tokens = nltk.word_tokenize(sentence)
pos_tags = nltk.pos_tag(tokens)
print nltk.ne_chunk(pos_tags, binary=True)
我發現this question有關我的問題。不幸的是我無法下載整個語料庫,因爲我在服務器上工作並且有很多內存限制。有人可以將我指向我需要的特定文件,因此我可以下載該文件而不是整個語料庫嗎?
(我使用Python 2.7.6)