Class GermanReadabilityRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.ReadabilityRule
org.languagetool.rules.de.GermanReadabilityRule

public class GermanReadabilityRule extends org.languagetool.rules.ReadabilityRule
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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     

    Fields inherited from class org.languagetool.rules.Rule

    messages
  • Constructor Summary

    Constructors
    Constructor
    Description
    GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest)
     
    GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest, boolean defaultOn)
     
    GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest, int level)
     
    GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest, int level, boolean defaultOn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    protected double
    getFleschReadingEase(double ASL, double ASW)
     
     
    getId(boolean tooEasyTest)
     
    protected String
    getMessage(int level, int FRE, int ASL, int ASW)
     
    private static boolean
    isVowel(char c)
     
    private static String
    printMessageLevel(int level)
     
    protected int
     

    Methods inherited from class org.languagetool.rules.ReadabilityRule

    getDefaultValue, getMaxConfigurableValue, getMinConfigurableValue, hasConfigurableValue, match, minToCheckParagraph

    Methods inherited from class org.languagetool.rules.TextLevelRule

    estimateContextForSureMatch, match, match

    Methods inherited from class org.languagetool.rules.Rule

    addExamplePair, getAntiPatterns, getCategory, getCorrectExamples, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getSentenceWithImmunization, getUrl, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • tooEasyTest

      private boolean tooEasyTest
  • Constructor Details

    • GermanReadabilityRule

      public GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest)
    • GermanReadabilityRule

      public GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest, int level)
    • GermanReadabilityRule

      public GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest, boolean defaultOn)
    • GermanReadabilityRule

      public GermanReadabilityRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig, boolean tooEasyTest, int level, boolean defaultOn)
  • Method Details

    • getId

      public String getId()
      Overrides:
      getId in class org.languagetool.rules.ReadabilityRule
    • getId

      public String getId(boolean tooEasyTest)
      Overrides:
      getId in class org.languagetool.rules.ReadabilityRule
    • getDescription

      public String getDescription()
      Overrides:
      getDescription in class org.languagetool.rules.ReadabilityRule
    • printMessageLevel

      private static String printMessageLevel(int level)
    • getMessage

      protected String getMessage(int level, int FRE, int ASL, int ASW)
      Overrides:
      getMessage in class org.languagetool.rules.ReadabilityRule
    • getConfigureText

      public String getConfigureText()
      Overrides:
      getConfigureText in class org.languagetool.rules.ReadabilityRule
    • getFleschReadingEase

      protected double getFleschReadingEase(double ASL, double ASW)
      Overrides:
      getFleschReadingEase in class org.languagetool.rules.ReadabilityRule
    • isVowel

      private static boolean isVowel(char c)
    • simpleSyllablesCount

      protected int simpleSyllablesCount(String word)
      Overrides:
      simpleSyllablesCount in class org.languagetool.rules.ReadabilityRule