spacyfishing icon indicating copy to clipboard operation
spacyfishing copied to clipboard

Using Example text all out put except NER is Null?

Open Djmcflush opened this issue 2 years ago • 3 comments

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))

Djmcflush avatar Dec 23 '22 17:12 Djmcflush

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)

Djmcflush avatar Dec 23 '22 17:12 Djmcflush

I have the same problem here, tested on python 3.8 and python 3.10

Kaelorn avatar Jan 23 '23 10:01 Kaelorn

I just checked the closed issues and this is related to https://github.com/Lucaterre/spacyfishing/issues/12 The solution worked for me

Kaelorn avatar Jan 23 '23 10:01 Kaelorn