Back to LanguageTool Homepage - Privacy - Imprint

Abstract rules for agreement

(Bjørn Seljebotn) #1

I'm investigating rule engines for different kinds of correction programs, i.e. grammar checkers. It is important to me to be able to write both general rules and specific ones. What is i.e. possible to achieve in Languagetool on this use case i German:

Incorrect: Er sagte, dass wir nicht in dem Auto lesen kannst.
Correct: Er sagte, dass wir nicht in dem Auto lesen kønnen.

To check agreement between nomen and finite verb, I would like to write a rule with an algoritm like: "verb number gender = nomen number gender; scope=current sentence". A rule like this will catch basic agreement in German and might be restricted with more specific cases. Can this be done in Languagetool? Or put it another way: Is it possible to make agreement rules on the level of POS-tags only?

I am also looking for a complete overview of rule syntax and commands. Where do I find it?

Thanks for any feedback.

(Daniel Naber) #2

Yes, this could be detected with a Java rule. The question is more whether this works well on real sentences, i.e. whether it doesn't create false alarms. Details about adding a Java rule can be found at

The XML syntax is documented at, the Java API is documented at