相关疑难解决方法(0)

如何在NLTK中使用混淆矩阵模块?

我使用混淆矩阵跟随NLTK书,但confusionmatrix看起来很奇怪.

#empirically exam where tagger is making mistakes
test_tags = [tag for sent in brown.sents(categories='editorial')
    for (word, tag) in t2.tag(sent)]
gold_tags = [tag for (word, tag) in brown.tagged_words(categories='editorial')]
print nltk.ConfusionMatrix(gold_tags, test_tags)
Run Code Online (Sandbox Code Playgroud)

任何人都可以解释如何使用混淆矩阵?

python nlp nltk

3
推荐指数
1
解决办法
4630
查看次数

标签 统计

nlp ×1

nltk ×1

python ×1