Class ReadabilityIndex
java.lang.Object
org.episteme.social.linguistics.ReadabilityIndex
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordEncapsulates the evaluation of a readability calculation. -
Method Summary
Modifier and TypeMethodDescriptionCalculates the Automated Readability Index (ARI).colemanLiauIndex(String text) Calculates the Coleman-Liau Index based on character and sentence counts.Calculates the Flesch-Kincaid Grade Level.fleschReadingEase(String text) Calculates the Flesch Reading Ease score.gunningFogIndex(String text) Calculates the Gunning Fog Index.Calculates the SMOG (Simple Measure of Gobbledygook) Index.
-
Method Details
-
fleschReadingEase
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
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
Calculates the Gunning Fog Index. Formula: 0.4 * ((words/sentences) + 100 * (complex words/words))- Parameters:
text- input text- Returns:
- ReadabilityResult
-
smogIndex
Calculates the SMOG (Simple Measure of Gobbledygook) Index. Formula: 1.043 * sqrt(30 * polysyllables/sentences) + 3.1291- Parameters:
text- input text- Returns:
- ReadabilityResult
-
colemanLiauIndex
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
Calculates the Automated Readability Index (ARI). Formula: 4.71 * (characters/words) + 0.5 * (words/sentences) - 21.43- Parameters:
text- input text- Returns:
- ReadabilityResult
-