You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_)
Output:
France GPE
Francois PERSON
I suppose ner should depend upon transformer.
Your Environment
Operating System: Linux
Python Version Used: 3.11.7
spaCy Version Used: 3.7.2
Environment Information:
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: