How to add my new NER model to existing Spacy

A very simple question here but cannot find any support for it in the documentation.

I have trained a new entity type, which works great. How do I add support for this new entity type in our Spacy model?

Hi! By "adding support for the new entity type", do you mean updating an existing entity recognizer so that it predicts some categories, plus your new entity type? So you have one ner component in your pipeline that predicts all your labels?

In that case, you typically want to either update the existing model with examples of your new entity type, or train a new model from scratch in data that was labelled for all categories you're interested in. Often you can use the existing model to do the labelling for you – if you're happe with its predictions for PERSON, just run it over some data and let it create the annotations for you. If you're doing NER, the presence and absence of labels can have a big impact – for instance, some tokens have label A, they can't have label B, and vice versa. You also don't want your model to suddenly stop predicting A if you show it only examples of B. So ideally, you want to have a dataset that includes examples of all entity types you're interested in, including the previous labels and the new entity type.

1 Like