Same word, different inflection

Is there a way to check two consequtive words to have the same base word, but different inflection, without specifying the base word?

Example:

Is been.

I am also interested in this feature (for example, to write antipatterns for “citoyens et citoyennes”). It doesn’t seem possible now.

This pattern only works if the first token is the lemma itself:

<pattern>
    <token regexp="yes">.+</token>
    <token inflected="yes"><match no="0"/></token>
</pattern>

It would be nice to write something like:

<pattern>
    <token regexp="yes">.+</token>
    <token inflected="yes"><match no="0" inflected="yes"/></token>
</pattern>

This could be implemented. (Lemmas are not unique in a token, so we have to check any lemma in the first token versus any lemma in the second one).

Using the postag, one could force the base word of the first like this:
<token postag="WKW:TGW:INF" inflected="yes">
Right?

I opened a GitHub issue: repeated lemmas in patterns · Issue #5515 · languagetool-org/languagetool · GitHub

1 Like