aboSamoor / polyglot

Multilingual text (NLP) processing toolkit
http://polyglot-nlp.com
Other
2.31k stars 337 forks source link

Sentiment scores on entities are not in the range 0-1 #224

Open zafercavdar opened 4 years ago

zafercavdar commented 4 years ago

Description

As described at docs, "for each entity we identified, we can calculate the strength of the positive or negative sentiment it has on a scale from 0-1"

However, I sometimes receives scores bigger than 1.

How to reproduce

from polyglot.text import Text

text = "michael good morning"
doc = Text(text, hint_language_code="en")
entity = doc.entities[0] # "michael"
print(entity.positive_sentiment)
> 1.25