Update __init__.py

This commit is contained in:
lambertrego
2020-03-22 17:17:50 +01:00
committed by GitHub
parent ec3a57c484
commit 2f2266f34e
+2 -5
View File
@@ -37,11 +37,8 @@ class PySentiStr:
stdout_text = stdout_text.rstrip().replace("\t"," ")
stdout_text = stdout_text.replace('\r\n','')
senti_score = stdout_text.split(' ')
try:
senti_score = list(map(float, senti_score))
except ValueError:
raise ValueError("SentiStrengthLanguageFolderPath is set as '{}'. Ensure it is correct and ends with a forward slash '/'".format( self.SentiStrengthLanguageFolder))
senti_score = list(map(float, senti_score))
senti_score = [int(i) for i in senti_score]
if score == 'scale': # Returns from -1 to 1