viraja1 / grammar-check Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Lesser General Public License v3.0
License: GNU Lesser General Public License v3.0
pip install --user --upgrade grammar-check
ERROR: Could not find a version that satisfies the requirement grammar-check (from versions: none)
ERROR: No matching distribution found for grammar-check
Hi, I tried to install grammar-check on python 3.7 but I get the the following error when I try via "pip install grammar-check":
"Could not find a version that satisfies the requirement grammar-check (from versions: )
No matching distribution found for grammar-check" (pip is up-to-date)
I also tried to install via the wheel file "grammar_check-1.3.1-py2-none-any.whl (md5)", but then I get the error
"grammar_check-1.3.1-py2-none-any.whl is not a supported wheel on this platform".
However I did install grammar-check successfully on python 2.7 (via pip install grammar-check).
Here it is mentioned that grammar-check is compatible with python3.2+. Is there a way to make it work on 3.4?
Try this one "it is apple" does not give true sentence "it is an apple".
Is there any way to see pos tags assigned to the sentence. Will work if you can point out the code. Thanks
I install with pip and I get this:
$ pip3.7 install --user --upgrade grammar-check
Collecting grammar-check
Could not find a version that satisfies the requirement grammar-check (from versions: )
No matching distribution found for grammar-check
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Can anyone fix this
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/grammar_check-1.3.1-
py3.5.egg/grammar_check/init.py", line 302, in _get_root
with urlopen(url, data, cls._TIMEOUT) as f:
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in
_call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1282, in
http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.5/urllib/request.py", line 1257, in
do_open
r = h.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1197, in
getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 258, in
_read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
When running the following code:
import grammar_check
tool = grammar_check.LanguageTool('en-GB')
text = 'This are bad.'
matches = tool.check(text)
len(matches)
error is raised:
Traceback (most recent call last):
File "C:/Python27/coursera/grammar.py", line 2, in <module>
tool = grammar_check.LanguageTool('en-GB')
File "C:\Python27\lib\site-packages\grammar_check\__init__.py", line 190, in __init__
self._start_server_on_free_port()
File "C:\Python27\lib\site-packages\grammar_check\__init__.py", line 318, in _start_server_on_free_port
cls._start_server()
File "C:\Python27\lib\site-packages\grammar_check\__init__.py", line 330, in _start_server
server_cmd = get_server_cmd(cls._port)
File "C:\Python27\lib\site-packages\grammar_check\__init__.py", line 541, in get_server_cmd
java_path, jar_path = get_jar_info()
File "C:\Python27\lib\site-packages\grammar_check\__init__.py", line 554, in get_jar_info
raise JavaError(u"can't find Java")
JavaError: can't find Java
Java is installed already and set as global path variable. I have tried looking into the source code. Here is the function which I am unable to understand regarding java path.
def get_jar_info():
try:
java_path, jar_path = cache['jar_info']
except KeyError:
java_path = which('java')
if not java_path:
raise JavaError("can't find Java")
dir_name = get_directory()
jar_path = None
for jar_name in JAR_NAMES:
for jar_path in glob.glob(os.path.join(dir_name, jar_name)):
if os.path.isfile(jar_path):
break
else:
jar_path = None
if jar_path:
break
else:
raise PathError("can't find languagetool-standalone in {!r}"
.format(dir_name))
cache['jar_info'] = java_path, jar_path
return java_path, jar_path
Please have a look into this.
When trying to run the check function I am running into the error:
grammar_check.ServerError: http://127.0.0.1:8081: [Errno 104] Connection reset by peer
Here is the full Traceback:
Traceback (most recent call last):
File "/home/MYUSERNAME/grammar-check/grammar_check/__init__.py", line 302, in _get_root
with urlopen(url, data, cls._TIMEOUT) as f:
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 1346, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.6/urllib/request.py", line 1321, in do_open
r = h.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/MYUSERNAME/grammar-check/grammar_check/__init__.py", line 370, in _start_server
with urlopen(cls._url, data, cls._TIMEOUT) as f:
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 1346, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.6/urllib/request.py", line 1321, in do_open
r = h.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/MYUSERNAME/grammar-check/grammar_check/__init__.py", line 243, in check
root = self._get_root(self._url, self._encode(text, srctext))
File "/home/MYUSERNAME/grammar-check/grammar_check/__init__.py", line 306, in _get_root
cls._start_server()
File "/home/MYUSERNAME/grammar-check/grammar_check/__init__.py", line 375, in _start_server
raise ServerError('{}: {}'.format(cls._url, e))
grammar_check.ServerError: http://127.0.0.1:8081: [Errno 104] Connection reset by peer
Is there any reason for this and/or a way to fix it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.