aboSamoor/polyglot

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

zafercavdar opened this issue · 0 comments

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