Class AgreementRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.de.AgreementRule
public class AgreementRule
extends org.languagetool.rules.Rule
Simple agreement checker for German noun phrases. Checks agreement in:
- DET/PRO NOUN: e.g. "mein Auto", "der Mann", "die Frau" (correct), "die Haus" (incorrect)
- DET/PRO ADJ NOUN: e.g. "der riesige Tisch" (correct), "die riesigen Tisch" (incorrect)
TODO: the implementation could use a re-write that first detects the relevant noun phrases and then checks agreement
- Author:
- Daniel Naber
-
Field Summary
Fields inherited from class org.languagetool.rules.Rule
messages -
Constructor Summary
Constructors -
Method Summary
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
-
Constructor Details
-
AgreementRule
-
-
Method Details
-
getId
- Specified by:
getIdin classorg.languagetool.rules.Rule
-
estimateContextForSureMatch
public int estimateContextForSureMatch()- Overrides:
estimateContextForSureMatchin classorg.languagetool.rules.Rule
-
getDescription
- Specified by:
getDescriptionin classorg.languagetool.rules.Rule
-
match
public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence) - Specified by:
matchin classorg.languagetool.rules.Rule
-
getAntiPatterns
public List<org.languagetool.tagging.disambiguation.rules.DisambiguationPatternRule> getAntiPatterns()- Overrides:
getAntiPatternsin classorg.languagetool.rules.Rule
-