jxmorris12 / language_tool_python

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

Detection of your/you're is extremely poor #24

Closed ThatOtherAndrew closed 4 years ago

ThatOtherAndrew commented 4 years ago

With the following code:

import language_tool_python
language = language = language_tool_python.LanguageTool("en-UK")

resultsOne = language.check("If you think this sentence is fine then, your wrong.")
resultsTwo = language.check("You're mum is called Emily, is that right?")

print(f"resultsOne:{resultsOne}\nresultsTwo:{resultsTwo}")

The output is:

resultsOne: []
resultsTwo: []

These are very obvious grammar mistakes, and yet the bot isn't picking them up for some reason.

jxmorris12 commented 4 years ago

Screen Shot 2020-10-05 at 8 13 16 PM

Hey @ThatOtherAndrew -- thanks for pointing this out. I tried this on the LT website and at least the first input should show an error. Something is definitely up. I'll look into this.

jxmorris12 commented 4 years ago

I think I fixed it! Here's a Colab notebook displaying the new results: https://colab.research.google.com/drive/17FauebMSBicJ3B4DsCs06FUFBbZ0yhT7?usp=sharing

You'll need to pip install --upgrade language_tool_python to ensure you're on version 2.4.4. Let me know if you have any issue!