alimajnoon1377 / sentistrength Goto Github PK
View Code? Open in Web Editor NEWI have problem whit that this is my code on jupyter notebook: from sentistrength import PySentiStr senti=PySentiStr() senti.setSentiStrengthPath("C:\aaaa\SentiStrength.jar") senti.setSentiStrengthLanguageFolderPath("D:\\9LanguageSetsPoor\\persian\\") r=['امروز هوا سرد اما فوق العاده است','روز بدی است'] result=senti.getSentiment(r , score='scale') print(result) and this is the output: FileNotFoundError Traceback (most recent call last) <ipython-input-10-d2117cf09e09> in <module> 4 senti.setSentiStrengthLanguageFolderPath("D:\\9LanguageSetsPoor\\persian\\") 5 r=['امروز هوا سرد اما فوق العاده است','روز بدی است'] ----> 6 result=senti.getSentiment(r , score='scale') 7 print(result) c:\users\asus\env\lib\site-packages\sentistrength\__init__.py in getSentiment(self, df_text, score) 31 df_text = df_text.str.replace('\r','') 32 conc_text = '\n'.join(df_text) ---> 33 p = subprocess.Popen(shlex.split("java -jar '" + self.SentiStrengthLocation + "' stdin sentidata '" + self.SentiStrengthLanguageFolder + "' trinary"),stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 34 b = bytes(conc_text.replace(" ","+"), 'utf-8') 35 stdout_byte, stderr_text = p.communicate(b) c:\users\asus\appdata\local\programs\python\python38-32\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text) 852 encoding=encoding, errors=errors) 853 --> 854 self._execute_child(args, executable, preexec_fn, close_fds, 855 pass_fds, cwd, env, 856 startupinfo, creationflags, shell, c:\users\asus\appdata\local\programs\python\python38-32\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session) 1305 # Start the process 1306 try: -> 1307 hp, ht, pid, tid = _winapi.CreateProcess(executable, args, 1308 # no special security 1309 None, None, FileNotFoundError: [WinError 2] The system cannot find the file specified help me!!!