如何创建增量式NER训练模型(在现有模型中追加)? [英] How to create incremental NER training model(Appending in existing model)?

查看:281
本文介绍了如何创建增量式NER训练模型(在现有模型中追加)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 stanford NLP 训练自定义命名实体识别(NER)模型,但是我想重新训练模型

示例:

假设我训练了 xyz模型,然后,如果模型检测到错误,我将在某些文本上对其进行测试,然后我(最终用户)将对其进行纠正,并希望对模型进行重新训练(附加模式)更正的文本.

斯坦福大学不提供重新训练工具,所以这就是为什么我转向python的 spacy 库的原因,我可以在其中重新训练模型,也可以追加新实体但是,在使用spacy重新训练模型后,它会覆盖现有知识(意味着其中的现有训练数据),并且仅显示与最近训练相关的结果.

考虑,我使用1000条记录在 TECHNOLOGY 标签上训练了一个模型.此后,我又向现有的实体中添加了一个 BOOK_NAME 训练有素的模型.在此之后,如果我测试模型,那么伪造模型仅从文本中检测到 BOOK_NAME .

请提出解决我的问题的建议.

预先感谢...!

解决方案

我认为在这里解决这个问题有点晚了.您面临的问题也称为灾难性的遗忘问题" .您可以通过发送现有示例的示例来克服它.像Spacy一样,可以很好地预测BBC语料库等格式良好的文本.您可以选择这样的语料库,使用预先训练的spacy模型进行预测并创建训练示例.将这些示例与您的新示例混合,然后进行培训.您现在应该获得更好的结果.在spacy问题中已经提到.

I am training customized Named Entity Recognition(NER) model using stanford NLP but the thing is i want to re-train the model.

Example :

Suppose i trained xyz model , then i will test it on some text if model detected somethings wrong then i (end user) will correct it and wanna re-train(append mode) the model on the corrected text.

Stanford Doesn't provide re-training facility so thats why i shifted towards spacy library of python , where i can retrain the model means , i can append new entities into the existing model.But after re-training the model using spacy , it overriding the existing knowledge(means existing training data in it) and just showing the result related to recent training.

Consider , i trained a model on TECHNOLOGY tag using 1000 records.after that lets say i have added one more entity BOOK_NAME to existing trained model.after this if i test model then spacy model just detecting BOOK_NAME from text.

Please give a suggestion to tackle my problem statement.

Thanks in Advance...!

解决方案

I think it is a bit late to address this here. The issue you are facing is what is also called 'Catastrophic Forgetting problem'. You can get over it by sending in examples for existing examples. Like Spacy can predict well on well formed text like BBC corpus. You can choose such corpus, predict using pretrained model of spacy and create training examples. Mix these examples with your new examples and then train. You should now get better results. It was mentioned already in the spacy issues.

这篇关于如何创建增量式NER训练模型(在现有模型中追加)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆