language_tool_python icon indicating copy to clipboard operation
language_tool_python copied to clipboard

Ignoring Certain Error Matches

Open Varun221 opened this issue 2 years ago • 0 comments

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?

Varun221 avatar Jun 06 '23 05:06 Varun221