jxmorris12 / language_tool_python

a free python grammar checker 📝✅
GNU General Public License v3.0
423 stars 59 forks source link

en-US #54

Closed yishairasowsky closed 2 years ago

yishairasowsky commented 2 years ago

@jayvdb @hiddenspirit @Tilka @myint @misrasaurabh1

import language_tool_python
tool = language_tool_python.LanguageTool('en-UK')
# tool = language_tool_python.LanguageTool('en-US')
text = 'A sentence with a error in the Hitchhiker’s Guide tot he Galaxy'
matches = tool.check(text)
len(matches)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-21873d5f8bb0> in <module>()
      1 import language_tool_python
----> 2 tool = language_tool_python.LanguageTool('en-UK')
      3 # tool = language_tool_python.LanguageTool('en-US')
      4 text = 'A sentence with a error in the Hitchhiker’s Guide tot he Galaxy'
      5 matches = tool.check(text)

2 frames
/usr/local/lib/python3.7/dist-packages/language_tool_python/server.py in _query_server(self, url, params, num_tries)
    216         for n in range(num_tries):
    217             try:
--> 218                 with requests.get(url, params=params, timeout=self._TIMEOUT) as response:
    219                     try:
    220                         return response.json()

AttributeError: __enter__
jxmorris12 commented 2 years ago

What is the question exactly? You're using the tool as expected, and this looks like an error with the requests library. Try running pip install requests --upgrade and re-trying.

yishairasowsky commented 2 years ago

working now. THank you!@

On Sun, Jan 30, 2022 at 5:26 PM Jack Morris @.***> wrote:

What is the question exactly? You're using the tool as expected, and this looks like an error with the requests library. Try running pip install requests --upgrade and re-trying.

— Reply to this email directly, view it on GitHub https://github.com/jxmorris12/language_tool_python/issues/54#issuecomment-1025166865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJN7CN2MQMZOYGWGFVUHAWDUYVKDNANCNFSM5ND5UTNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

-- Please let me know if you have any questions. Many thanks! Best wishes, Yishai Rasowsky Phone (972) 54-848-2245 Spare (972) 54-751-6040 *Learning: Blog http://talkinginlearning.wordpress.com Questions https://www.dafyomi.co.il/askollel.htm Classes: Kol Halashon https://www.kolhalashon.com/New/RavDaf/RavInfoD.aspx?RavID=999149&English=True&Lang=English

Torah Downloads https://torahdownloads.com/s-437-rabbi-yishai-rasowsky.html Professional: Portfolio https://github.com/yishairasowsky/professional_qualifications/blob/master/md/portfolio.md | Linkedin https://www.linkedin.com/in/yishai-rasowsky-a28189164/ *