Class ReadabilityIndex

java.lang.Object
org.episteme.social.linguistics.ReadabilityIndex

public final class ReadabilityIndex extends Object
Utility tool for calculating various text readability indices. Supports standard linguistic formulas including Flesch, Gunning Fog, SMOG, Coleman-Liau, and the Automated Readability Index (ARI).
Since:
1.0
Version:
2.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Method Details

    • fleschReadingEase

      public static ReadabilityIndex.ReadabilityResult fleschReadingEase(String text)
      Calculates the Flesch Reading Ease score. Formula: 206.835 - 1.015 * (words/sentences) - 84.6 * (syllables/words)
      Parameters:
      text - the input text to analyze
      Returns:
      ReadabilityResult (higher score = easier to read)
    • fleschKincaidGradeLevel

      public static ReadabilityIndex.ReadabilityResult fleschKincaidGradeLevel(String text)
      Calculates the Flesch-Kincaid Grade Level. Formula: 0.39 * (words/sentences) + 11.8 * (syllables/words) - 15.59
      Parameters:
      text - input text
      Returns:
      ReadabilityResult representing the school grade level
    • gunningFogIndex

      public static ReadabilityIndex.ReadabilityResult gunningFogIndex(String text)
      Calculates the Gunning Fog Index. Formula: 0.4 * ((words/sentences) + 100 * (complex words/words))
      Parameters:
      text - input text
      Returns:
      ReadabilityResult
    • smogIndex

      public static ReadabilityIndex.ReadabilityResult smogIndex(String text)
      Calculates the SMOG (Simple Measure of Gobbledygook) Index. Formula: 1.043 * sqrt(30 * polysyllables/sentences) + 3.1291
      Parameters:
      text - input text
      Returns:
      ReadabilityResult
    • colemanLiauIndex

      public static ReadabilityIndex.ReadabilityResult colemanLiauIndex(String text)
      Calculates the Coleman-Liau Index based on character and sentence counts. Formula: 0.0588 * L - 0.296 * S - 15.8
      Parameters:
      text - input text
      Returns:
      ReadabilityResult
    • automatedReadabilityIndex

      public static ReadabilityIndex.ReadabilityResult automatedReadabilityIndex(String text)
      Calculates the Automated Readability Index (ARI). Formula: 4.71 * (characters/words) + 0.5 * (words/sentences) - 21.43
      Parameters:
      text - input text
      Returns:
      ReadabilityResult