Back to LanguageTool Homepage - Privacy - Imprint

Help with POS tagging

I am having trouble with POS tags in languagetool/languagetool-language-modules/lv at latvian · aidan-plenert-macdonald/languagetool · GitHub

When I try a rule like,

			<rule>
			<pattern>
				<marker>
					<token postag="P....." postag_regexp="yes" />
					<token>draugs</token>
				</marker>
			</pattern>
			<message>Genitive after prepositions (fake rule)</message>
			<suggestion>\1 drauga</suggestion>
			<example correction="pie drauga">
				<marker>pie draugs</marker>
			</example>
		</rule>

The tests fail to pick up the rule and complain that no incorrect examples were found.

In my latvian.dump file I have

ar      ar      P00000
pie     pie     P00000

I build the binary dict with

java -cp ./languagetool-standalone/target/LanguageTool-5.5-SNAPSHOT/LanguageTool-5.5-SNAPSHOT/languagetool.jar \
    org.languagetool.tools.POSDictionaryBuilder -i ./latvian.dump \
    -info languagetool-language-modules/lv/src/main/resources/org/languagetool/resource/lv/latvian.info \
    -o languagetool-language-modules/lv/src/main/resources/org/languagetool/resource/lv/latvian.dict

What’s wrong?

It seems your Latvian.java file doesn’t implement getTagger() yet?