org.languagetool.rules.de
Class AgreementRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.de.GermanRule
org.languagetool.rules.de.AgreementRule
public class AgreementRule
- extends GermanRule
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)
Note that this rule only checks agreement inside the noun phrase, not whether
e.g. the correct case is used. For example, "Es ist das Haus dem Mann" is not
detected as incorrect.
TODO: the implementation could use a re-write that first detects the relevant noun phrases and then checks agreement
- Author:
- Daniel Naber
| Fields inherited from class org.languagetool.rules.Rule |
messages |
| Methods inherited from class org.languagetool.rules.Rule |
addRuleMatch, clearMatches, getCategory, getCorrectExamples, getIncorrectExamples, getLocQualityIssueType, getMatches, getMatchesIndex, getUrl, isDefaultOff, isInMatches, isInRemoved, isParagraphBackTrack, isSpellingRule, setAsDeleted, setCategory, setCorrectExamples, setDefaultOff, setIncorrectExamples, setLocQualityIssueType, setParagraphBackTrack, setUrl, supportsLanguage, toRuleMatchArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AgreementRule
public AgreementRule(ResourceBundle messages)
getId
public String getId()
- Specified by:
getId in class Rule
getDescription
public String getDescription()
- Specified by:
getDescription in class Rule
match
public RuleMatch[] match(AnalyzedSentence text)
- Specified by:
match in class Rule
reset
public void reset()
- Specified by:
reset in class Rule
Copyright © 2013. All Rights Reserved.