spacyfishing
spacyfishing copied to clipboard
Using Example text all out put except NER is Null?
import spacy
text_en = "Victor Hugo and Honoré de Balzac are French writers who lived in Paris."
nlp_model_en = spacy.load("en_core_web_sm")
# specify configuration:
nlp_model_en.add_pipe("entityfishing", config={"extra_info": True})
doc_en = nlp_model_en(text_en)
# Access to description with ent._.description:
for ent in doc_en.ents:
print((ent.text, ent.label_, ent._.kb_qid, ent._.normal_term, ent._.description, ent._.src_description, ent._.other_ids))
Example Output: ('Victor Hugo', 'EVENT', None, None, None, None, None) ('Honoré de Balzac', 'PERSON', None, None, None, None, None) ('French', 'NORP', None, None, None, None, None) ('Paris', 'GPE', None, None, None, None, None)
I have the same problem here, tested on python 3.8 and python 3.10
I just checked the closed issues and this is related to https://github.com/Lucaterre/spacyfishing/issues/12 The solution worked for me