Relation-Classification-using-Bidirectional-LSTM-Tree icon indicating copy to clipboard operation
Relation-Classification-using-Bidirectional-LSTM-Tree copied to clipboard

cannot execute the file preprocessing.py completely

Open radhikagupta6 opened this issue 5 years ago • 0 comments

LookupError Traceback (most recent call last) in () 9 e1_text = text 10 e1_text_ = " ".join(e1_text) ---> 11 e1_text = tokenizer.tokenize(e1_text) 12 text.append(t[0]) 13 e11= t[0]

F:\anaconda\lib\site-packages\nltk\tokenize\stanford.py in tokenize(self, s) 85 """ 86 cmd = ['edu.stanford.nlp.process.PTBTokenizer'] ---> 87 return self._parse_tokenized_output(self._execute(cmd, s)) 88 89 def execute(self, cmd, input, verbose=False):

F:\anaconda\lib\site-packages\nltk\tokenize\stanford.py in execute(self, cmd, input, verbose) 97 98 # Configure java. ---> 99 config_java(options=self.java_options, verbose=verbose) 100 101 # Windows is incompatible with NamedTemporaryFile() without passing in delete=False.

F:\anaconda\lib\site-packages\nltk\internals.py in config_java(bin, options, verbose) 60 env_vars=['JAVAHOME', 'JAVA_HOME'], 61 verbose=verbose, ---> 62 binary_names=['java.exe'], 63 ) 64

F:\anaconda\lib\site-packages\nltk\internals.py in find_binary(name, path_to_bin, env_vars, searchpath, binary_names, url, verbose) 695 return next( 696 find_binary_iter( --> 697 name, path_to_bin, env_vars, searchpath, binary_names, url, verbose 698 ) 699 )

F:\anaconda\lib\site-packages\nltk\internals.py in find_binary_iter(name, path_to_bin, env_vars, searchpath, binary_names, url, verbose) 679 """ 680 for file in find_file_iter( --> 681 path_to_bin or name, env_vars, searchpath, binary_names, url, verbose 682 ): 683 yield file

F:\anaconda\lib\site-packages\nltk\internals.py in find_file_iter(filename, env_vars, searchpath, file_names, url, verbose, finding_dir) 637 msg += '\n\n For more information on %s, see:\n <%s>' % (filename, url) 638 div = '=' * 75 --> 639 raise LookupError('\n\n%s\n%s\n%s' % (div, msg, div)) 640 641

LookupError:

=========================================================================== NLTK was unable to find the java file! Use software specific configuration paramaters or set the JAVAHOME environment variable.

radhikagupta6 avatar Dec 12 '19 21:12 radhikagupta6