ner.make-gold (correct) vs. spacy.displacy model directly?

I've trained a spacy model to enhance recognition of ORGs that are specific to our documents, based on en-core-web-lg-2.1.0. When I run prodigy 1.8.5 ner.make-gold, the proposed annotations look great. However, when I run spacy.displacy using the same model, the annotations are not the same. Any ideas for things to check what I'm doing wrong?

Both Prodigy's ner.make-gold / ner.correct and spaCy's displacy show you exactly what comes in in the doc.ents. So there shouldn't be a difference.

Did you check that both your environments are running the same version of spaCy? If your model is based on a v2.1.x model, you'll either need to run it with spaCy v2.1.x, or retrain it with v2.2.x. Otherwise, the model is not compatible.

I was getting this warning, and perhaps that was the problem.

.conda/envs/prodigy/lib/python3.7/runpy.py:193: UserWarning: [W019] Changing vectors name from en_model.vectors to en_model.vectors_684831, to avoid clash with previously loaded vectors. See Issue #3853.
"main", mod_spec)

I resolve this issue and now it is working. Thanks!

1 Like