Python 2.7 - JavaError when using grammar-check 1.3.1 library -
i trying use grammar-check 1.3.1 library python
i have installed using pip commands
$ pip install --upgrade 3to2 $ pip install --upgrade language-check i unzipped languagetool file this link , moved c:\users\me\appdata\roaming\python\python27\site-packages\grammar_check
then tried run test program
import grammar_check gc open("file.txt") f: tool = gc.languagetool('en-us') matches = tool.check(f.read()) print len(matches) but got error
file "lang-grammar-checker.py", line 22, in main tool = gc.languagetool(predicted) file "c:\users\me\appdata\roaming\python\python27\site-packages\grammar_check\__init__.py", line 190, in __init__ self._start_server_on_free_port() file "c:\users\me\appdata\roaming\python\python27\site-packages\grammar_check\__init__.py", line 318, in _start_server_on_free_port cls._start_server() file "c:\users\me\appdata\roaming\python\python27\site-packages\grammar_check\__init__.py", line 330, in _start_server server_cmd = get_server_cmd(cls._port) file "c:\users\me\appdata\roaming\python\python27\site-packages\grammar_check\__init__.py", line 541, in get_server_cmd java_path, jar_path = get_jar_info() file "c:\users\me\appdata\roaming\python\python27\site-packages\grammar_check\__init__.py", line 554, in get_jar_info raise javaerror(u"can't find java") grammar_check.javaerror: can't find java i have java8 installed in computer. how can solve error?
the problem system can't see java. can check if system "knows" java typing:
java -version in command prompt (without going java location!). can adding environment variable path java development kit location. how set or change path system variable?
Comments
Post a Comment