我已经浏览过Hunpos Tagger上的所有帖子,并且跟着他们一起使用它,但不幸的是,每个单词都被标记为“无&## 39 ;.这是我的代码和输出:
from nltk.tag.hunpos import HunposTagger
from nltk import word_tokenize
sentence = "Please turn off the computer and unplug the AC adaptor"
tokens = word_tokenize(sentence)
tagger = HunposTagger('/home/arindam/EclipseWorkspace/Resources/HunPOSTagger/Models/en_wsj.model', '/home/arindam/EclipseWorkspace/Resources/HunPOSTagger/hunpos-1.0-linux/hunpos-tag')
print tagger.tag(tokens)
[(' Please',None),(' turn',None),(' off',None),'' 39;,无),('计算机',无),('和',无),('拔掉',无),' ',无),(' AC',无),('适配器',无)]
任何人都可以帮忙,让我知道为什么会这样吗?