languagetool-org / languagetool

Style and Grammar Checker for 25+ Languages
https://languagetool.org
GNU Lesser General Public License v2.1
12.03k stars 1.38k forks source link

[en] Subject-Verb Agreement – which strategy is best? #4962

Open udomai opened 3 years ago

udomai commented 3 years ago

If we want to catch basic subject-verb agreement errors, I'd start with the safest scenarios.

For example: SENT_START + singular subject + plural verb form

How can we approach this most efficiently? Is the subject-centered approach the best one?

Here is a draft PR for that: https://github.com/languagetool-org/languagetool/pull/4961

            <example correction="goes|went|will go">This dress <marker>go</marker> well with those shoes.</example>
            <example correction="goes|went|will go">She <marker>go</marker> to work really early.</example>
            <example correction="sang|sings|will sing">The tall lady in the bright red dress over there <marker>sing</marker> beautiful songs.</example>
udomai commented 3 years ago

A different strategy could be: Going more fine-grained.

First word of the sentence: DT|PRP\$..., then min="0" RB, then min="0" JJ…