Using patterns with model

Can you add a pattern file to a model?

matcher = Matcher(nlp_lg.vocab)
pattern = [{"LOWER": "tumulus"}]
matcher.add("thing", [pattern])
AMIE_Text = df.loc[52]["TEXT"]
doc = nlp_lg(AMIE_Text)
spacy.displacy.render(doc, style='ent')

It seems to make no difference and doesn't tag 'tumulus'.

Output:

(Name: SS 26271656 ORG ) Woolley Barrows PERSON ( NR ORG ). (SS 26191653 CARDINAL ) Tumulus (NR).

Hi Matt,

this seems to be a question more related to spaCy than to Prodigy. In general, it's best to ask these questions on the spaCy discussion forum on Github because that's where you'll find the spaCy core contributors.

That said, you might find this spaCy-short video useful. It adds a EntityRuler to a blank spaCy pipeline, but the exact same code could be used to add a ruler to a en_core_web_lg model as well.