python - 将自定义训练的 NER 模型与斯坦福 CoreNLP 中的现有默认模型集成

标签 python stanford-nlp named-entity-recognition

我通过以下链接训练了语料库。

https://www.sicara.ai/blog/2018-04-25-python-train-model-NTLK-stanford-ner-tagger

数据集是我训练过的一些健康博客(英语)的数据集。我成功地能够在我新的看不见的文本上运行这个模型。

问题:我面临的问题是我想在斯坦福 CoreNLP 中运行我的自定义英语 NER 模型以及默认英语模型。

期望的结果:我希望斯坦福默认模型在我自己的自定义模型 NER 模型之后以顺序方式运行,以处理我自己的模型错过的那些英语实体。

最佳答案

 ner.model = /path/to/custom-model.ser.gz,edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz,edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz,edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz

这里有更多信息:

https://stanfordnlp.github.io/CoreNLP/api.html

https://stanfordnlp.github.io/CoreNLP/cmdline.html

关于python - 将自定义训练的 NER 模型与斯坦福 CoreNLP 中的现有默认模型集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58073494/

相关文章:

python - 扩展在文件系统中存储文件的应用程序时需要考虑什么?

python - 使用 python 在生产中实现模型

python - 当conda尚未支持时,如何在Windows上安装最新的Tensorflow(在此处为: 2. 2)?

java - CoreNLP MaxentTagger 架构选项 - 含义和有效性

nlp - 斯坦福 NLP CoreNLP 不对中文进行句子分割

python - SpaCy 3 交叉验证

python - ValueError : Layer weight shape (43, 100) 与提供的权重形状不兼容 (412457, 400)

machine-learning - 如何将树编码为神经网络的输入?

named-entity-recognition - TokensregexNER 应该使用哪些设置

c# - C# 泛型集合中的倒排索引