diff --git a/sentistrength/__init__.py b/sentistrength/__init__.py index f60b339..05081b5 100644 --- a/sentistrength/__init__.py +++ b/sentistrength/__init__.py @@ -41,8 +41,8 @@ class PySentiStr: senti_score = list(map(float, senti_score)) senti_score = [int(i) for i in senti_score] - if score == 'scale': # Returns from -1 to 1 - senti_score = [sum(senti_score[i:i+2])/4 for i in range(0, len(senti_score), 3)] + if score == 'scale': # Returns from -4 to 4 + senti_score = [sum(senti_score[i:i+2]) for i in range(0, len(senti_score), 3)] elif score == 'binary': # Return 1 if positive and -1 if negative senti_score = [1 if senti_score[i] >= abs(senti_score[i+1]) else -1 for i in range(0, len(senti_score), 3)] elif score == 'trinary': # Return Positive and Negative Score and Neutral Score diff --git a/setup.py b/setup.py index be6a472..fc984f3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="sentistrength", - version="0.0.5", + version="0.0.8", author="Zhun Hung", author_email="yongzhunhung@gmail.com", description="Python 3 Wrapper for SentiStrength, reads a single or multiple input with options for binary class or scale output.",