Copy postags from match to suggestion?

Let’s say I want to match the phrase “gemacht sein” and I want to suggest “gemacht haben”, but for every form of “sein”. So, for “gemacht seid” I want to suggest “gemacht habt”, for “gemacht wäre” “gemacht hätte”.

Is there a way to transfer all the postags from a certain match to the suggestion even if the two words are not similar at all, except that they are both verbs?

Something along these lines:
<suggestion><match no="2" [MAGICALLY REPLACE LEMMA] /></suggestion>

See: Development Overview | dev.languagetool.org

You need to do something like:
<suggestion><match no="2" postag="(V.*) postag_regexp="yes" postag_replace="$1">haben</match></suggestion>

2 Likes

Thanks a bunch, man! That works like a charm.