Package org.apache.sling.cms.readability

## Interface ReadabilityService

    public interface ReadabilityService

Service for calculating the readability of text

### Method Summary

All Methods Instance Methods Abstract Methods
`double` `calculateARI​(String text)` Calculates Automated Readability Index for text
`double` `calculateARI​(Text text)` Calculates Automated Readability Index for text
`double` `calculateAverageGradeLevel​(String text)` Calculates the average grade level
`double` `calculateAverageGradeLevel​(Text text)` Calculates the average grade level
`double` `calculateColemanLiauIndex​(String text)` Calculates Coleman-Liau Index for text
`double` `calculateColemanLiauIndex​(Text text)` Calculates Coleman-Liau Index for text
`double` `calculateFleschKincaidGradeLevel​(String text)` Calculates Flesch-Kincaid Readability for text
`double` `calculateFleschKincaidGradeLevel​(Text text)` Calculates Flesch-Kincaid Readability for text
`double` `calculateFleschReadingEase​(String text)` Calculates Flesch-Kincaid Reading Ease for text
`double` `calculateFleschReadingEase​(Text text)` Calculates Flesch-Kincaid Reading Ease for text
`double` `calculateGunningFog​(String text)` Calculates Gunning-Fog Index for text
`double` `calculateGunningFog​(Text text)` Calculates Gunning-Fog Index for text
`double` `calculateSMOG​(String text)` Calculates Simple Measure of Gobbledygook Grade for text
`double` `calculateSMOG​(Text text)` Calculates Simple Measure of Gobbledygook Grade for text
`Text` `extractSentences​(String text)` Extracts the sentences from the text including the words and various counts.
`Locale` `getLocale()` Gets the locale for this configuration.

### Method Detail

#### calculateARI

    double calculateARI​(String text)

Calculates Automated Readability Index for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Automated Readability Index for text

#### calculateARI

    double calculateARI​(Text text)

Calculates Automated Readability Index for text

Parameters:
  `text` - the analyzed text
Returns:
  the Automated Readability Index for text

#### calculateAverageGradeLevel

    double calculateAverageGradeLevel​(String text)

Calculates the average grade level

Parameters:
  `text` - the text string to analyze
Returns:
  the average grade level for text

#### calculateAverageGradeLevel

    double calculateAverageGradeLevel​(Text text)

Calculates the average grade level

Parameters:
  `text` - the analyzed text
Returns:
  the average grade level for text

#### calculateColemanLiauIndex

    double calculateColemanLiauIndex​(String text)

Calculates Coleman-Liau Index for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Coleman-Liau Index for text

#### calculateColemanLiauIndex

    double calculateColemanLiauIndex​(Text text)

Calculates Coleman-Liau Index for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Coleman-Liau Index for text

#### calculateFleschKincaidGradeLevel

    double calculateFleschKincaidGradeLevel​(String text)

Calculates Flesch-Kincaid Readability for text

Parameters:
  `text` - the text string to analyze
Returns:
  Returns the Flesch-Kincaid Readability value for the text

#### calculateFleschKincaidGradeLevel

    double calculateFleschKincaidGradeLevel​(Text text)

Calculates Flesch-Kincaid Readability for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Flesch-Kincaid Readability value for the text

#### calculateFleschReadingEase

    double calculateFleschReadingEase​(String text)

Calculates Flesch-Kincaid Reading Ease for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Flesch-Kincaid Reading Ease value for the text

#### calculateFleschReadingEase

    double calculateFleschReadingEase​(Text text)

Calculates Flesch-Kincaid Reading Ease for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Flesch-Kincaid Reading Ease value for the text

#### calculateGunningFog

    double calculateGunningFog​(String text)

Calculates Gunning-Fog Index for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Gunning-Fog Index for text

#### calculateGunningFog

    double calculateGunningFog​(Text text)

Calculates Gunning-Fog Index for text

Parameters:
  `text` - the text string to analyze
Returns:
  the Gunning-Fog Index for text

#### calculateSMOG

    double calculateSMOG​(String text)

Calculates Simple Measure of Gobbledygook Grade for text

Parameters:
  `text` - the text string to analyze
Returns:
  the SMOG value for the text

#### calculateSMOG

    double calculateSMOG​(Text text)

Calculates Simple Measure of Gobbledygook Grade for text

Parameters:
  `text` - the text string to analyze
Returns:
  the SMOG value for the text

#### extractSentences

    Text extractSentences​(String text)

Extracts the sentences from the text including the words and various counts.

Parameters:
  `text` - the text to analyze
Returns:
  the analyzied text

#### getLocale

    Locale getLocale()

Gets the locale for this configuration.

Returns:
  the locale