Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Example text all out put except NER is Null? #20

Open
Djmcflush opened this issue Dec 23, 2022 · 3 comments
Open

Using Example text all out put except NER is Null? #20

Djmcflush opened this issue Dec 23, 2022 · 3 comments

Comments

@Djmcflush
Copy link

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
Copy link
Author

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 Djmcflush reopened this Dec 23, 2022
@Kaelorn
Copy link

Kaelorn commented Jan 23, 2023

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

@Kaelorn
Copy link

Kaelorn commented Jan 23, 2023

I just checked the closed issues and this is related to #12
The solution worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants