class GermanReadabilityRule extends ReadabilityRule {
  
  private final boolean tooEasyTest;

  public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest) {
    this(messages, lang, userConfig, tooEasyTest, -1, false);
  }
  
  public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, int level) {
    this(messages, lang, userConfig, tooEasyTest, level, false);
  }
  
  public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, boolean tooEasyTest, boolean defaultOn) {
    this(messages, lang, userConfig, tooEasyTest, -1, defaultOn);
  }
  
  public GermanReadabilityRule(ResourceBundle messages, Language lang, UserConfig userConfig, 
      boolean tooEasyTest, int level, boolean defaultOn) {
    super(messages, lang, userConfig, tooEasyTest, level, defaultOn);
    super.setCategory(new Category(new CategoryId("CREATIVE_WRITING"), messages.getString("category_creative_writing"), Location.INTERNAL, false));
    this.tooEasyTest = tooEasyTest;
  }
  
  @Override
  public String getId() {
    return getId(tooEasyTest);
  }

  @Override
  public String getId(boolean tooEasyTest) {
    if (tooEasyTest) {
      return "READABILITY_RULE_SIMPLE_DE";
    } else {
      return "READABILITY_RULE_DIFFICULT_DE";
    }
  }

  @Override
  public String getDescription() {
    if (tooEasyTest) {
      return "Lesbarkeit: Zu einfacher Text";
    } else {
      return "Lesbarkeit: Zu schwieriger Text";
    }
  }

  @Override
  public String printMessageLevel(int level) {
    String sLevel = null;
    if (level == 0) {
      sLevel = "Sehr schwer";
    } else if (level == 1) {
      sLevel = "Schwer";
    } else if (level == 2) {
      sLevel = "Mittelschwer";
    } else if (level == 3) {
      sLevel = "Mittel";
    } else if (level == 4) {
      sLevel = "Mittelleicht";
    } else if (level == 5) {
      sLevel = "Leicht";
    } else if (level == 6) {
      sLevel = "Sehr leicht";
    }
    if (sLevel != null) {
      return " {Grad " + level + ": " + sLevel + "}";
    }
    return "";
  }
  
  @Override
  protected String getMessage(int level, int fre, int als, int asw) {
    String simple;
    String few;
    if (tooEasyTest) {
      simple = "einfach";
      few = "wenige";
    } else {
      simple = "schwierig";
      few = "viele";
    }
    return "Lesbarkeit: Der Text dieses Absatzes ist zu " + simple + printMessageLevel(level) + ". Zu "
        + few + " Wörter pro Satz und zu " + few + " Silben pro Wort.";
  }

  @Override
  public String getConfigureText() {
    return "Grad der Lesbarkeit 0 (sehr schwierig) bis 6 (sehr einfach):";
  }

  @Override
  public double getFleschReadingEase(double asl, double asw) {
    return 180 - asl - ( 58.5 * asw );  //  German
  }
  
  @Override
  protected int simpleSyllablesCount(String word) {<FILL_FUNCTION_BODY>}
  
}

    if (word.length() == 0) {
      return 0;
    }
    int nSyllables = 0;
    if (GermanTools.isVowel(word.charAt(0))) {
      nSyllables++;
    }
    boolean lastDouble = false;
    for (int i = 1; i < word.length(); i++) {
      char c = word.charAt(i);
      if (GermanTools.isVowel(c)) {
        char cl = word.charAt(i - 1);
        if (lastDouble) {
          nSyllables++;
          lastDouble = false;
        } else if (((c == 'i' || c == 'y') && (cl == 'a' || cl == 'e' || cl == 'A' || cl == 'E')) ||
            (c == 'u' && (cl == 'a' || cl == 'e' || cl == 'o' || cl == 'A' || cl == 'E' || cl == 'O')) ||
            (c == 'e' && (cl == 'e' || cl == 'i' || cl == 'E' || cl == 'I')) ||
            (c == 'a' && (cl == 'a' || cl == 'A'))) {
          lastDouble = true;
        } else {
          nSyllables++;
          lastDouble = false;
        }
      } else {
        lastDouble = false;
      }
    }
    return nSyllables == 0 ? 1 : nSyllables;
  
<methods>public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig, boolean) ,public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig, boolean, int) ,public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig, boolean, boolean) ,public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig, boolean, int, boolean) ,public int getAllSentences() ,public int getAllSyllables() ,public int getAllWords() ,public java.lang.String getConfigureText() ,public int getDefaultValue() ,public java.lang.String getDescription() ,public double getFleschReadingEase(double, double) ,public java.lang.String getId() ,public java.lang.String getId(boolean) ,public int getMaxConfigurableValue() ,public int getMinConfigurableValue() ,public boolean hasConfigurableValue() ,public org.languagetool.rules.RuleMatch[] match(List<org.languagetool.AnalyzedSentence>) throws java.io.IOException,public int minToCheckParagraph() ,public java.lang.String printMessageLevel(int) <variables>private static final int MARK_WORDS,private static final int MIN_WORDS,private final non-sealed org.languagetool.Language lang,private final non-sealed int level,private final non-sealed org.languagetool.LinguServices linguServices,private int nAllSentences,private int nAllSyllables,private int nAllWords,private final non-sealed boolean tooEasyTest