Back to LanguageTool Homepage - Privacy - Imprint

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


#1

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=""> <pattern> <marker> <or> <token>is</token> <token>are</token> </or> </marker> </pattern> <message><match no="1" postag="VB"></match></message> <example correction="be">This <marker>is</marker>.</example> <example>This be.</example> </rule>

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.


#4

postag_replace="VB" Does’t work either.


(Knorr) #5

I sthis possibly a duplicate of https://github.com/languagetool-org/languagetool/issues/652 ?


#6

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.