diff --git a/senpy/plugins/sentiment140/sentiment140.py b/senpy/plugins/sentiment140/sentiment140.py index 99aefd8..a0431fc 100644 --- a/senpy/plugins/sentiment140/sentiment140.py +++ b/senpy/plugins/sentiment140/sentiment140.py @@ -20,9 +20,10 @@ class Sentiment140Plugin(SentimentPlugin): polarity_value = self.maxPolarityValue*int(res.json()["data"][0] ["polarity"]) * 0.25 polarity = "marl:Neutral" - if polarity_value > 50: + neutral_value = self.maxPolarityValue / 2.0 + if polarity_value > neutral_value: polarity = "marl:Positive" - elif polarity_value < 50: + elif polarity_value < neutral_value: polarity = "marl:Negative" entry = Entry(id="Entry0", text=params["input"], diff --git a/setup.py b/setup.py index 99fae45..cff5ca8 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ except AttributeError: install_reqs = [str(ir.req) for ir in install_reqs] test_reqs = [str(ir.req) for ir in test_reqs] -VERSION = "0.4.8" +VERSION = "0.4.9" setup( name='senpy',