Ah, yes – that looks like what I was referring to. The error message here isn't very nice, but I'm pretty sure it fails because the blank NER component isn't initialized.
No, I just meant in the code you use to create blank_ner_en_core_web_lg
Instead of calling create_pipe
and replace_pipe
, you just call remove_pipe
and get rid of the old entity recognizer:
nlp = spacy.load("en_core_web_lg")
nlp.remove_pipe("ner")
nlp.to_disk("en_core_web_lg_without_ner")
Prodigy should then add it and initialize it when you train. Alternatively, you can also use the code I posted above to initialize the blank NER component after you add it.