-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add descriptive information for parts of speech tag #1034
Comments
This is a nice idea! I think the best way to do this would be to add a module print(token.pos_, spacy.explain(token.pos_))
# PROPN Proper noun I'll play around with this and test it – should be easy to get something simple together for the next release and then keep updating it over time. It's tempting to also extend this beyond strings and let users pass in objects as well... but I'm not sure if this is really a good idea. (For example, if you pass in an instance of |
Just added You can either import spacy.explain('NORP')
# Nationalities or religious or political groups
doc = nlp(u'Hello world')
for word in doc:
print(word.text, word.tag_, spacy.explain(word.tag_))
# Hello UH interjection
# world NN noun, singular or mass Note that the function always expects the string representation of a tag or label. If a term can't be found it the glossary, |
That was super fast! Thank you @ines |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am following a tutorial about spaCy. The tutorial focuses on part of speech tagging, the code snippet outputs jargons like
PROPN, ADP
. It's hard to judge what this means. It will be useful to have descriptive details about the names.The developer can later look up somewhere
The text was updated successfully, but these errors were encountered: