Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar check fails #67

Closed
dvwright opened this issue Apr 15, 2021 · 3 comments
Closed

Grammar check fails #67

dvwright opened this issue Apr 15, 2021 · 3 comments

Comments

@dvwright
Copy link

Issue:
Grammatically incorrect english sentence is not identified

sentence = 'Make sure to include you phone number.'

Received result:
Make sure to include you phone number.

Expected result:
Make sure to include your phone number.

Version:
nlprule-0.5.3

To recreate:

from nlprule import Tokenizer, Rules

tokenizer = Tokenizer.load("en")
rules = Rules.load("en", tokenizer)

content = 'Make sure to include you phone number.'
fixed = rules.correct(content)

if fixed == content:
    print('Grammar passed')
else:
    print('Grammar failed')

# returns: Grammar passed

Result on LanguageTool
Screen Shot 2021-04-15 at 11 18 46 AM

@dvwright
Copy link
Author

Here is another sentence which Language tool identifies four issues but no issues are found by nlprule, "Doesnt it mean theyre youre friends"

@bminixhofer
Copy link
Owner

bminixhofer commented Apr 15, 2021

Hi, thanks for the issue. There are two things here:

That leaves one error in your second sentence (with "means") but since this is a false positive by LT anyway I don't think its necessary to investigate further. There are some rules from LT which are not implemented in nlprule (see stats in the README).

@bminixhofer
Copy link
Owner

Let me know if there's any other mismatches not explained by the points above (point (1) is usually the case if LT writes "... seems less likely than...").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants