Package org.apache.sling.cms.readability
Interface ReadabilityService
-
public interface ReadabilityServiceService for calculating the readability of text
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublecalculateARI(String text)Calculates Automated Readability Index for textdoublecalculateARI(Text text)Calculates Automated Readability Index for textdoublecalculateAverageGradeLevel(String text)Calculates the average grade leveldoublecalculateAverageGradeLevel(Text text)Calculates the average grade leveldoublecalculateColemanLiauIndex(String text)Calculates Coleman-Liau Index for textdoublecalculateColemanLiauIndex(Text text)Calculates Coleman-Liau Index for textdoublecalculateFleschKincaidGradeLevel(String text)Calculates Flesch-Kincaid Readability for textdoublecalculateFleschKincaidGradeLevel(Text text)Calculates Flesch-Kincaid Readability for textdoublecalculateFleschReadingEase(String text)Calculates Flesch-Kincaid Reading Ease for textdoublecalculateFleschReadingEase(Text text)Calculates Flesch-Kincaid Reading Ease for textdoublecalculateGunningFog(String text)Calculates Gunning-Fog Index for textdoublecalculateGunningFog(Text text)Calculates Gunning-Fog Index for textdoublecalculateSMOG(String text)Calculates Simple Measure of Gobbledygook Grade for textdoublecalculateSMOG(Text text)Calculates Simple Measure of Gobbledygook Grade for textTextextractSentences(String text)Extracts the sentences from the text including the words and various counts.LocalegetLocale()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
-
-