token.sentiment is only outputting 0.0 #12547
Answered
by
svlandeg
Ibrokhimsadikov
asked this question in
Help: Coding & Implementations
-
in any polarity token token.sentiement attribute is giving 0.0 score, why is that? Thank you for any suggestion |
Beta Was this translation helpful? Give feedback.
Answered by
svlandeg
Apr 19, 2023
Replies: 1 comment 2 replies
-
The |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
svlandeg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
sentiment
attribute isn't being automatically filled by any spaCy components - it's there for convenience in case you want to implement sentiment analysis using a rule-based or machine learning approach (using textcat). There's a simple example in the docs for a rule-based approach: https://spacy.io/usage/rule-based-matching#example3.