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
text = """
Tania’s story began in the UK in the summer of 2000
Tania’s story began in the United Kingdom in the summer of 2000
Tania’s story began in Great Britain in the summer of 2000
Tania’s story began in GBR in the summer of 2000\
"""
doc = nlp(text)
display(pd.DataFrame(
[
{
'Named Entity': ent.root.text,
'Label': ent.root.ent_type_,
'OntoNotes Description': spacy.explain(ent.root.ent_type_),
'Wikidata ID': ent..kb_qid,
'Nerd Score': ent..nerd_score,
'Normal term': ent..normal_term,
}
for ent in doc.ents if ent.label == "GPE"
]
))
print(doc..annotations)
print(doc..metadata)
`
And here are the results:
Expected behavior
I would expect the above code to return a wikidata ID for the named entities in the text
Desktop (please complete the following information):
OS: MacOS 14
Python version: Python 3.9.13
SpaCy version: 3.4.3
spacyfishing version: 0.1.8
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
The Entity Fishing pipeline component is not returning any results from wikidata
To Reproduce
Here is the code
`
import spacy
import pandas as pd
nlp = spacy.load('en_core_web_sm')
nlp.add_pipe("merge_entities")
nlp.add_pipe("entityfishing", config={"extra_info": True})
text = """
Tania’s story began in the UK in the summer of 2000
Tania’s story began in the United Kingdom in the summer of 2000
Tania’s story began in Great Britain in the summer of 2000
Tania’s story began in GBR in the summer of 2000\
"""
doc = nlp(text)
display(pd.DataFrame(
[
{
'Named Entity': ent.root.text,
'Label': ent.root.ent_type_,
'OntoNotes Description': spacy.explain(ent.root.ent_type_),
'Wikidata ID': ent..kb_qid,
'Nerd Score': ent..nerd_score,
'Normal term': ent..normal_term,
}
for ent in doc.ents if ent.label == "GPE"
]
))
print(doc..annotations)
print(doc..metadata)
`
And here are the results:
Expected behavior
I would expect the above code to return a wikidata ID for the named entities in the text
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: