For a Named Entity Recognition task in Dutch with spaCy, I added entities using EntityRuler. When I add the ruler to the pipeline in my notebook:
nlp = spacy.load("nl_core_news_md")
ruler = nlp.add_pipe("entity_ruler", before="ner")
patterns = complete_dicts # This is a list of dictionaries, e.g. [{"label": "PERSON", "pattern": "Staf Aerts"}, {"label": "PERSON", "pattern": "Meyrem Almaci"}]
ruler.add_patterns(patterns)
the NER-pipeline works very well. However, when I save it to my disk and then load this model again using
nlp.from_disk("path/to_model")
the model misses entities that are added through the EntityRuler.
I found nothing in the documentation why this would happen. I would be grateful for anyone who has an explanation for this! Thanks.