I just wanted entities so I thought I would only enable NER in case it goes a bit faster.
import spacy
nlp = spacy.load("en_core_web_trf", enable=["ner"])
results = nlp("I went to France for a coffee with Francois")
for ent in results.ents:
print(ent.text, ent.label_)
It looks like the outputs are just that subsequent bigrams is ORDINAL:
I went ORDINAL
to France ORDINAL
for a ORDINAL
coffee with ORDINAL
The problem goes away when I enable transformer:
import spacy
nlp = spacy.load("en_core_web_trf", enable=["ner", "transformer"])
results = nlp("I went to France for a coffee with Francois")
for ent in results.ents:
print(ent.text, ent.label_)
How to reproduce the behaviour
I just wanted entities so I thought I would only enable NER in case it goes a bit faster.
It looks like the outputs are just that subsequent bigrams is ORDINAL:
The problem goes away when I enable transformer:
Output:
I suppose
ner
should depend upontransformer
.Your Environment