Add more 3 new entity type

Hello, I'm a new user of prodigy.
I want to ask, if I want to add 4 new labels and still keeping for the old labels in the en_core_web_sm model, how should I do?
I read from Prodigy Flowchart if I want to add more than 3 new entities, I should using ner.manual then ner.batch-train. I did it. I want to use existing and newly added labels in the same time.
when I want to test the model that I expect, which model am I calling in spacy? did I make mistake? Sorry for my bad English

Hi! Can you share the ner.batch-train command you ran? If you set an --output argument on the command line, the model will be saved to that directory. For example:

prodigy ner.batch-train your_dataset blank:en --output /path/to/model --n-iter 10

The above will train from a blank English model using your dataset and it will save the result to /path/to/model. In spaCy, you can then do:

nlp = spacy.load("/path/to/model")

if i want to mix entity in en_core_web_sm and my new entity, what should I do?

Ah, I thought you had already done the annotation. One thing you can try is using the ner.make-gold recipe with the labels you want to keep, plus the new labels. For example:

prodigy ner.make_gold your_dataset en_core_web_sm your_data.jsonl --label PERSON,ORG,GPE,NEW_LABEL1,NEW_LABEL2

The --label values set on the command line are the labels you can use. Prodigy will also highlight everything the model already predicts for the labels in the model (for example, PERSON). This lets you annotate faster.

whoo, I see. Thank you :slight_smile:

1 Like