From 2f2266f34e234f24b249fcf96a33fe5f10384da1 Mon Sep 17 00:00:00 2001 From: lambertrego Date: Sun, 22 Mar 2020 17:17:50 +0100 Subject: [PATCH] Update __init__.py --- sentistrength/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sentistrength/__init__.py b/sentistrength/__init__.py index bb1cac1..f60b339 100644 --- a/sentistrength/__init__.py +++ b/sentistrength/__init__.py @@ -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