nltk - NLTK 感知器标记器的标记集是什么?

标签 nltk

NLTK 感知器标记器的标记集是什么?预训练模型使用的语料库是什么?

我试图从NLTK网站上找到官方信息。但他们没有那个。

最佳答案

来自 https://github.com/nltk/nltk/pull/1143 ,我们看到它是来自 https://spacy.io/blog/part-of-speech-pos-tagger-in-python 的端口

训练好的标签集 tagdict包括以下标签:

>>> from nltk.tag import PerceptronTagger
>>> tagger = PerceptronTagger()
>>> set(tagger.tagdict.values())
set(['PRP$', 'VBG', 'VBD', '``', 'VBN', "''", 'VBP', 'WDT', 'JJ', 'WP', 'VBZ', 'DT', '#', '$', 'NN', ')', '(', ',', '.', 'TO', 'PRP', 'RB', ':', 'NNS', 'NNP', 'VB', 'WRB', 'CC', 'CD', 'EX', 'IN', 'WP$', 'MD', 'JJS', 'JJR'])

完整的标签集是:
>>> sorted(tagger.classes)
['#', '$', "''", '(', ')', ',', '.', ':', 'CC', 'CD', 'DT', 'EX', 'FW', 'IN', 'JJ', 'JJR', 'JJS', 'LS', 'MD', 'NN', 'NNP', 'NNPS', 'NNS', 'PDT', 'POS', 'PRP', 'PRP$', 'RB', 'RBR', 'RBS', 'RP', 'SYM', 'TO', 'UH', 'VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ', 'WDT', 'WP', 'WP$', 'WRB', '``']

这是 Penn Treebank 标签集来自:https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html

关于nltk - NLTK 感知器标记器的标记集是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38578100/

相关文章:

python - 将 QuadgramCollat​​ionFinder 转换为 PentagramCollat​​ionFinder

ipython - 如何制作 iPython/Jupyter 中内联的 NLTK draw() 树

python - 遍历 python 列表

python - 如何使用正则表达式获取在字符串中重复多次的模式

nltk - 为什么 Sacrebleu 对于短句子返回零 BLEU 分数?

python - NLTK 和停用词失败 #lookuperror

python - 如何识别句子的主语?

python - 如何在 NLTK Python 中为语料库创建子类别

python - 除了 punkt tokenizer 之外,NLTK 中还有其他句子 tokenizer

python - 训练两个特征而不是一个