Back to LanguageTool Homepage - Privacy - Imprint

Same word used in multiple declensions

The word “draugu” is used in multiple declensions. See Valoda - Vārda analīze. draugs

I tried a rule like

		<rule name="accusative">
					<token regexp="yes">ap|caur|gar|pār</token>
					<token postag="N[^A]...." postag_regexp="yes" />
			<message>\1 [ko]</message>
			<suggestion>\1 draugu</suggestion>
			<example correction="ap draugu">
				<marker>ap draugs</marker>

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?

Hi @aidan.plenert.macdon :slight_smile:

From the looks of it, it seems that “draugu” matches the postag="N[^A]....".

If that is not correct, there is probably a wrong tag in the Latvian dictionary. There are three ways of solving this:

  • edit the Latvian dictionary (if you have a way of editing the binary file)
  • put the incorrect tagging in the Latvian removed.txt, if that is already implemented
  • write a rule in the Latvian disambiguation that takes the wrong tag away in any context (not a clean solution, but a workaround)

I hope this condensed info is of any use to you :nerd_face: