问题
I'm writing a dissertation, and using nltk.pos_tagger in my work. I can't find any information about what the accuracy of this algorithm. Does anybody know where can I find such information?
回答1:
NLTK
default pos tagger pos_tag
is a MaxEnt tagger, see line 82 from https://github.com/nltk/nltk/blob/develop/nltk/tag/init.py
from nltk.corpus import brown
from nltk.data import load
sents = brown.tagged_sents()
# test on last 10% of brown corpus.
numtest = len(sents) / 10
testsents = sents[numtest:]
_POS_TAGGER = 'taggers/maxent_treebank_pos_tagger/english.pickle'
tagger = load(_POS_TAGGER)
print tagger.evaluate(testsents)
[out]:
来源:https://stackoverflow.com/questions/25108053/what-is-the-accuracy-of-nltk-pos-tagger