jxmorris12 / language_tool_python

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

error executing :: language_tool_python.correct(text, res) #2

Closed SRIKARHI closed 4 years ago

SRIKARHI commented 4 years ago

AttributeError Traceback (most recent call last)

in () ----> 1 language_tool_python.correct(text, res) AttributeError: module 'language_tool_python' has no attribute 'correct' matches are found but for this line I am getting error
jxmorris12 commented 4 years ago

working on it, get back to you soon.

jxmorris12 commented 4 years ago

Hi @SRIKARHI ,

This was due to an error on my end, sorry! I made some changes and the problem you've experienced should be fixed in the latest build, 2.0.3.

Here's a sample output:

❯ python
Python 3.7.6 (default, Jan  8 2020, 13:42:34)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import language_tool_python
>>> tool = language_tool_python.LanguageTool('en-US')
>>> text = 'A sentence with a error in the Hitchhiker\'s Guide tot he Galaxy'
>>> tool.correct(text)
"A sentence with an error in the Hitchhiker's Guide to the Galaxy"
>>>

Please let me know if that fixed your issue!

jxmorris12

SRIKARHI commented 4 years ago

Hello sir, The changes u made fixed the issue.

Thank you.

On Tue, May 5, 2020 at 8:13 PM Jack Morris notifications@github.com wrote:

Hi @SRIKARHI https://github.com/SRIKARHI ,

This was due to an error on my end, sorry! I made some changes and the problem you've experienced should be fixed in the latest build, 2.0.3.

Here's a sample output:

❯ python

Python 3.7.6 (default, Jan 8 2020, 13:42:34)

[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin

Type "help", "copyright", "credits" or "license" for more information.

import language_tool_python

tool = language_tool_python.LanguageTool('en-US')

text = 'A sentence with a error in the Hitchhiker\'s Guide tot he Galaxy'

tool.correct(text)

"A sentence with an error in the Hitchhiker's Guide to the Galaxy"

Please let me know if that fixed your issue!

jxmorris12

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jxmorris12/language_tool_python/issues/2#issuecomment-624097577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPYKLUTMZBK6KPIOF6GWFTRQAQ2HANCNFSM4MZJTHXQ .

-- Regards, Srikar H I School of Electronics and Communication KLE Technological University Hubballi.