diff --git a/sentistrength/__init__.py b/sentistrength/__init__.py index 0dafdc0..c8d6ba0 100644 --- a/sentistrength/__init__.py +++ b/sentistrength/__init__.py @@ -7,7 +7,7 @@ from os import getcwd class PySentiStr: def __init__(self): - pass + pass # self.SentiStrengthLocation = os.path.join(getcwd(),"SentiStrength.jar") # self.SentiStrengthLanguageFolder = os.path.join(getcwd(),"SentiStrengthData/") @@ -19,12 +19,12 @@ class PySentiStr: self.SentiStrengthLanguageFolder = sslf_Path def getSentiment(self, df_text, score='scale'): - if not hasattr(self, 'SentiStrengthLocation'): - print("Set path using setSentiStrengthPath(path) function.") - if not hasattr(self, 'SentiStrengthLanguageFolder'): - print("Set path using setSentiStrengthLanguageFolderPath(path) function.") + if not hasattr(self, 'SentiStrengthLocation'): + assert False, "Set path using setSentiStrengthPath(path) function." + + if not hasattr(self, 'SentiStrengthLanguageFolder'): + assert False, "Set path using setSentiStrengthLanguageFolderPath(path) function." - # Able to take in single string or list of string and convert into pandas Series if type(df_text) != pd.Series: df_text = pd.Series(df_text) df_text = df_text.str.replace('\n','') diff --git a/setup.py b/setup.py index b8c3788..fc19354 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.1", + version="0.0.3", 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.",