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

Ignoring Certain Error Matches #75

Open
Varun221 opened this issue Jun 6, 2023 · 0 comments
Open

Ignoring Certain Error Matches #75

Varun221 opened this issue Jun 6, 2023 · 0 comments

Comments

@Varun221
Copy link

Varun221 commented Jun 6, 2023

Hello, I am not sure if I am using the functionality correctly.

import language_tool_python
tool = language_tool_python.LanguageTool('en-US')
matches = tool.check('This are bad.')

This gives two matches for the errors. one for this -> these and the other for are -> is.
Both matches are dependent on each other, as only of them can be applied.

But when I run
language_tool_python.utils.correct('This are bad.', matches)
I get
'These is bad.'

Is there any way to check which matches should be applied?

Possible Solution:
One way I can think of is to apply each correction progressively and reapply the language tool each time. If this is the way, why isn't this
implemented by default?

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

1 participant