I am trying to train spaCy models using just the python -m spacy train
command line tool without writing any code of my own.
I have a training set of documents to which I have added OIL_COMPANY
entity spans. I used gold.docs_to_json
to create training files in the JSON-serializable format.
I can train starting from an empty model. However, if I try to extend the existing en_core_web_lg
model I see the following error.
KeyError: "[E022] Could not find a transition with the name 'B-OIL_COMPANY' in the NER model."
So I need to be able to tell the command line tool to add OIL_COMPANY
to an existing list of NER labels. The discussion in Training an additional entity type shows how to do this in code by calling add_label
on the NER pipeline, but I don't see any command line option that does this.
Is it possible to extend an existing NER model to new entities with just the command line training tools, or do I have to write code?