Back to LanguageTool Homepage - Privacy - Imprint

Wrong match suggestion when changing postag in rules with <or>


Hello, I recently noticed that I have some rules where changing postag in match doesn't produce correct form of the word, because of <or> tag e.g.:
<rule id="" name="">
<message><match no="1" postag="VB"></match></message>
<example correction="be">This <marker>is</marker>.</example>
<example>This be.</example>

This shows "is", but it should show "be". Is this a bug? I know that i can rewrite these rules in <rulegroup>, but in the present way rules look clearer.

(Daniel Naber) #2

Yes, that looks like a bug. Internally, rules with <or> are generating two rules, so I'm not sure why this happens. You might want to open a bug.

(Jan Schreiber) #3

Could you try if postag_replace="VB" yields the expected result? I can't test it atm.


postag_replace="VB" Does't work either.

(Knorr) #5

I sthis possibly a duplicate of ?


Seems to be related.

(Oleg) #7

Think I’ve fixed that, but the case mentionned by @Knorr in bugreport still not working throwing another error. Maybe somebody familiar with tags behavior could help me (UPD: no more needed)? The error description on github.