Package org.languagetool.rules.de
Class GermanCompoundRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.AbstractCompoundRule
org.languagetool.rules.de.GermanCompoundRule
- Direct Known Subclasses:
SwissCompoundRule
Checks that compounds are not written as separate words. The supported compounds are loaded
from
/de/compounds.txt and /de/compounds-cities.txt in the resource directory.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final List<DisambiguationPatternRule> private static CompoundRuleDataFields inherited from class org.languagetool.rules.AbstractCompoundRule
lang, linguServices, sentenceStartsWithUpperCase, subRuleSpecificIds -
Constructor Summary
ConstructorsConstructorDescriptionGermanCompoundRule(ResourceBundle messages, Language lang, UserConfig userConfig) -
Method Summary
Modifier and TypeMethodDescriptionOverwrite this to avoid false alarms by ignoring these patterns - note that yourRule.match(AnalyzedSentence)method needs to callRule.getSentenceWithImmunization(org.languagetool.AnalyzedSentence)for this to be used and you need to checkAnalyzedTokenReadings.isImmunized()A short description of the error this rule can detect, usually in the language of the text that is checked.getId()A string used to identify the rule in e.g.booleanisMisspelled(String word) Methods inherited from class org.languagetool.rules.AbstractCompoundRule
estimateContextForSureMatch, filterReplacements, match, mergeCompound, useSubRuleSpecificIdsMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getRuleOptions, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isIncludedInHiddenMatches, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncludedInHiddenMatches, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setPriority, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
-
Field Details
-
ANTI_PATTERNS
-
compoundData
-
-
Constructor Details
-
GermanCompoundRule
public GermanCompoundRule(ResourceBundle messages, Language lang, UserConfig userConfig) throws IOException - Throws:
IOException
-
-
Method Details
-
getId
Description copied from class:RuleA string used to identify the rule in e.g. configuration files. This string is supposed to be unique and to stay the same in all upcoming versions of LanguageTool. It's supposed to contain only the charactersA-Zand the underscore.- Specified by:
getIdin classAbstractCompoundRule
-
getDescription
Description copied from class:RuleA short description of the error this rule can detect, usually in the language of the text that is checked.- Specified by:
getDescriptionin classAbstractCompoundRule
-
getCompoundRuleData
- Specified by:
getCompoundRuleDatain classAbstractCompoundRule
-
isMisspelled
- Overrides:
isMisspelledin classAbstractCompoundRule- Throws:
IOException
-
getAntiPatterns
Description copied from class:RuleOverwrite this to avoid false alarms by ignoring these patterns - note that yourRule.match(AnalyzedSentence)method needs to callRule.getSentenceWithImmunization(org.languagetool.AnalyzedSentence)for this to be used and you need to checkAnalyzedTokenReadings.isImmunized()- Overrides:
getAntiPatternsin classRule
-