Package org.languagetool.rules.de
Class CompoundCoherencyRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.de.CompoundCoherencyRule
public class CompoundCoherencyRule
extends org.languagetool.rules.TextLevelRule
Check consistent spelling for German compounds. It's a style issue
if a compound is written once with and once without hyphen in the same text.
E.g. "Zahnärzteverband" and "Zahnärzte-Verband"
-
Field Summary
Fields inherited from class org.languagetool.rules.Rule
messages
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
containsHyphenInside
(String token) getId()
private @Nullable String
getLemma
(org.languagetool.AnalyzedTokenReadings atr) org.languagetool.rules.RuleMatch[]
int
Methods inherited from class org.languagetool.rules.TextLevelRule
estimateContextForSureMatch, match, match
Methods inherited from class org.languagetool.rules.Rule
addExamplePair, getAntiPatterns, 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
-
CompoundCoherencyRule
-
-
Method Details
-
getId
- Specified by:
getId
in classorg.languagetool.rules.Rule
-
getDescription
- Specified by:
getDescription
in classorg.languagetool.rules.Rule
-
match
public org.languagetool.rules.RuleMatch[] match(List<org.languagetool.AnalyzedSentence> sentences) throws IOException - Specified by:
match
in classorg.languagetool.rules.TextLevelRule
- Throws:
IOException
-
containsHyphenInside
-
getLemma
-
minToCheckParagraph
public int minToCheckParagraph()- Specified by:
minToCheckParagraph
in classorg.languagetool.rules.TextLevelRule
-