diff --git a/README.md b/README.md index 0b0e808..ff80d40 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Python-SentiStrength Python 3 Wrapper for SentiStrength, reads a single or multiple input with options for binary class or scale output. -Ensure that you have SentiStrength.jar file and SentiStrengthData Language folders, otherwise you can download them from http://sentistrength.wlv.ac.uk/. +Ensure that you have SentiStrength.jar file and SentiStrengthData Language folders, otherwise you can download them from http://sentistrength.wlv.ac.uk/. For jar file, you will have to email Dr. Mike Thelwall. ## Installation diff --git a/sentistrength/__init__.py b/sentistrength/__init__.py index 05081b5..6afc30f 100644 --- a/sentistrength/__init__.py +++ b/sentistrength/__init__.py @@ -37,8 +37,11 @@ class PySentiStr: stdout_text = stdout_text.rstrip().replace("\t"," ") stdout_text = stdout_text.replace('\r\n','') senti_score = stdout_text.split(' ') - - senti_score = list(map(float, senti_score)) + + try: + senti_score = list(map(float, senti_score)) + except: + raise Exception(stdout_text) senti_score = [int(i) for i in senti_score] if score == 'scale': # Returns from -4 to 4 diff --git a/setup.py b/setup.py index fc984f3..2b0bf9f 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.8", + version="0.0.9", 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.",