Package org.languagetool.rules.de
Class GermanReadabilityRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.ReadabilityRule
org.languagetool.rules.de.GermanReadabilityRule
A rule that checks the readability of German text (using the Flesch-Reading-Ease Formula)
If tooEasyTest == true, the rule tests if paragraph level > level (readability is too easy)
If tooEasyTest == false, the rule tests if paragraph level < level (readability is too difficult)
- Since:
- 4.4
- Author:
- Fred Kruse
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest) GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, boolean defaultOn) GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, int level) GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, int level, boolean defaultOn) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetFleschReadingEase(double asl, double asw) getId()getId(boolean tooEasyTest) protected StringgetMessage(int level, int fre, int als, int asw) printMessageLevel(int level) protected intsimpleSyllablesCount(String word) Methods inherited from class org.languagetool.rules.ReadabilityRule
getAllSentences, getAllSyllables, getAllWords, getRuleOptions, match, minToCheckParagraphMethods inherited from class org.languagetool.rules.TextLevelRule
estimateContextForSureMatch, match, matchMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, 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
-
Constructor Details
-
GermanReadabilityRule
public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest) -
GermanReadabilityRule
public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, int level) -
GermanReadabilityRule
public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, boolean defaultOn) -
GermanReadabilityRule
public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, int level, boolean defaultOn)
-
-
Method Details
-
getId
- Overrides:
getIdin classReadabilityRule
-
getId
- Overrides:
getIdin classReadabilityRule
-
getDescription
- Overrides:
getDescriptionin classReadabilityRule
-
printMessageLevel
- Overrides:
printMessageLevelin classReadabilityRule
-
getMessage
- Overrides:
getMessagein classReadabilityRule
-
getConfigureText
- Overrides:
getConfigureTextin classReadabilityRule
-
getFleschReadingEase
public double getFleschReadingEase(double asl, double asw) - Overrides:
getFleschReadingEasein classReadabilityRule
-
simpleSyllablesCount
- Overrides:
simpleSyllablesCountin classReadabilityRule
-