The word “draugu” is used in multiple declensions. See Letonika.lv. Valoda - Vārda analīze. draugs
I tried a rule like
<rule name="accusative">
<pattern>
<marker>
<token regexp="yes">ap|caur|gar|pār</token>
<token postag="N[^A]...." postag_regexp="yes" />
</marker>
</pattern>
<message>\1 [ko]</message>
<suggestion>\1 draugu</suggestion>
<example correction="ap draugu">
<marker>ap draugs</marker>
</example>
</rule>
But it complains that the correction also matches the rule. It seems that “draugu” might be matching the plural genitive declension and thereby triggering the rule.
How can I fix this?