TypeError: HTTPConnection.getresponse() with French text.
Hello
If I try that:
text = "C'est un test pour verifier linstallation correcte de LanguageTool en francais."
texte_corrected = tool.correct(text)
I had an error:
If I tried a french sentence without error like that:
text = "C'est un test pour verifier l'installation correcte de LanguageTool en francais."
No error.
I tried:
text = "Cest un test pour verifier l'installation correcte de LanguageTool en francais."
no error.
it seems the error comes when we need to correct the sentence, with this specifique word "installation"
perhpas it is me, but another exemple: text = "PRIX DE CHATELGUYON Course 1 Course D 48.000. - Attelé, femelles. - 2.700 mètres (G. P.) 21.600, 12.000, 6.720, 3.840, 2.400, 960, 480. Pour juments de 6 ans (V), n'ayant pas gagné 104.000." texte_corrected = 'Courses'
It works for me with this little piece of code:
from language_tool_python import LanguageTool
tool = LanguageTool('fr')
text = "C'est un test pour verifier linstallation correcte de LanguageTool en francais."
texte_corrected = tool.correct(text)
print(texte_corrected)
The result:
>>> from language_tool_python import LanguageTool
>>> tool = LanguageTool('fr')
>>> text = "C'est un test pour verifier linstallation correcte de LanguageTool en francais."
>>> texte_corrected = tool.correct(text)
>>> print(texte_corrected)
C'est un test pour vérifier l'installation correcte de LanguageTool en français.
>>>