Using spacy's NER to for Entity Recognition of custom entities #9940
-
Hi!So I am currently working on building a custom entity recognizer using spacy. Whilst preparing the training examples, For tagging the data using the BILOU scheme, should I only add the new custom entity tags in my data while keeping the tags for the other tokens as 'O', or should I tag those as well? I only want to add new entities to the existing NER. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
It sounds like the best thing is to label just your entities and train a separate NER model to combine with the existing one. See the double NER example for notes on how that works. Also note that while you say you want to add the new entity to the existing NER model, I would recommend against that. If you only add your new entities as training data you'll run into the "catastrophic forgetting" problem, so you'd have to add data for all entities you want to keep using. But that would be a lot of work, can be hard to get right, and having all the entities in one model isn't necessarily better than having separate models. |
Beta Was this translation helpful? Give feedback.
It sounds like the best thing is to label just your entities and train a separate NER model to combine with the existing one. See the double NER example for notes on how that works.
Also note that while you say you want to add the new entity to the existing NER model, I would recommend against that. If you only add your new entities as training data you'll run into the "catastrophic forgetting" problem, so you'd have to add data for all entities you want to keep using. But that would be a lot of work, can be hard to get right, and having all the entities in one model isn't necessarily better than having separate models.