Class VerbAgreementRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.de.VerbAgreementRule

public class VerbAgreementRule extends org.languagetool.rules.TextLevelRule
Simple agreement checker for German verbs and subject. Checks agreement in:
  • VER:1:SIN w/o ich: e.g. "Max bin da." (incorrect) [same for VER:2:SIN w/o du, VER:1:PLU w/o wir]
  • ich + VER:[123]:.* (not VER:1:SIN): e.g. "ich bist" (incorrect) [same for du, er, wir]
TODO:
  • wenn nur ein mögliches finites Verb -> das nehmen (Max machen das.)
  • Sie (i>1)
  • bei ich/du/er/wir sofort prüfen, damit alle vorkommen geprüft werden (Ich geht jetzt nach Hause und dort gehe ich sofort unter die Dusche.) [aber: isNear]
  • Alle Verbvorkommen merken (Er präsentieren wollte und Video hätte keine Pläne.)
Author:
Markus Brenneis
  • Field Summary

    Fields inherited from class org.languagetool.rules.Rule

    messages
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.languagetool.tagging.disambiguation.rules.DisambiguationPatternRule>
     
     
     
    org.languagetool.rules.RuleMatch[]
    match(List<org.languagetool.AnalyzedSentence> sentences)
     
    int
     

    Methods inherited from class org.languagetool.rules.TextLevelRule

    estimateContextForSureMatch, match, match

    Methods inherited from class org.languagetool.rules.Rule

    addExamplePair, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in class org.languagetool.rules.Rule
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.languagetool.rules.Rule
    • match

      public org.languagetool.rules.RuleMatch[] match(List<org.languagetool.AnalyzedSentence> sentences)
      Specified by:
      match in class org.languagetool.rules.TextLevelRule
    • getAntiPatterns

      public List<org.languagetool.tagging.disambiguation.rules.DisambiguationPatternRule> getAntiPatterns()
      Overrides:
      getAntiPatterns in class org.languagetool.rules.Rule
    • minToCheckParagraph

      public int minToCheckParagraph()
      Specified by:
      minToCheckParagraph in class org.languagetool.rules.TextLevelRule