test_class.declarator: log = LoggerFactory.getLogger(ReadabilityServiceImplTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger log = LoggerFactory.getLogger(ReadabilityServiceImplTest.class);
test_class.type: Logger
test_class.var_name: log
test_class.declarator: readabilityService
test_class.modifier: private
test_class.original_string: private ReadabilityServiceImpl readabilityService;
test_class.type: ReadabilityServiceImpl
test_class.var_name: readabilityService
test_class.declarator: source1
test_class.modifier: private
test_class.original_string: private String source1;
test_class.type: String
test_class.var_name: source1
test_class.declarator: source2
test_class.modifier: private
test_class.original_string: private String source2;
test_class.type: String
test_class.var_name: source2
test_class.declarator: source3
test_class.modifier: private
test_class.original_string: private String source3;
test_class.type: String
test_class.var_name: source3
test_class.file: core/src/test/java/org/apache/sling/cms/core/readability/impl/ReadabilityServiceImplTest.java
test_class.identifier: ReadabilityServiceImplTest
test_case.body: @Test
      public void testFleschKincaidGradeLevel() throws IOException {
          log.info("testFleschKincaidGradeLevel");
  
          double fleschKincaidGradeLevel = readabilityService.calculateFleschKincaidGradeLevel(source1);
  
          log.debug("Flesch-Kincaid Grade Level {}", fleschKincaidGradeLevel);
  
          assertTrue(fleschKincaidGradeLevel > 14 && fleschKincaidGradeLevel < 15);
  
          fleschKincaidGradeLevel = readabilityService.calculateFleschKincaidGradeLevel(source2);
  
          log.debug("Flesch-Kincaid Grade Level {}", fleschKincaidGradeLevel);
  
          assertTrue(fleschKincaidGradeLevel > 12 && fleschKincaidGradeLevel < 13);
  
          fleschKincaidGradeLevel = readabilityService.calculateFleschKincaidGradeLevel(source3);
  
          log.debug("Flesch-Kincaid Grade Level {}", fleschKincaidGradeLevel);
  
          assertTrue(fleschKincaidGradeLevel > 5 && fleschKincaidGradeLevel < 6);
  
          log.info("Tests successful!");
      }
test_case.class_method_signature: ReadabilityServiceImplTest.testFleschKincaidGradeLevel()
test_case.full_signature: @Test public void testFleschKincaidGradeLevel()
test_case.identifier: testFleschKincaidGradeLevel
test_case.invocations: info calculateFleschKincaidGradeLevel debug assertTrue calculateFleschKincaidGradeLevel debug assertTrue calculateFleschKincaidGradeLevel debug assertTrue info
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFleschKincaidGradeLevel()
focal_class.declarator: complexityMin
focal_class.modifier: private
focal_class.original_string: private int complexityMin;
focal_class.type: int
focal_class.var_name: complexityMin
focal_class.declarator: extraVowelExpression
focal_class.modifier: private
focal_class.original_string: private Pattern extraVowelExpression;
focal_class.type: Pattern
focal_class.var_name: extraVowelExpression
focal_class.declarator: isWordExpression
focal_class.modifier: private
focal_class.original_string: private Pattern isWordExpression;
focal_class.type: Pattern
focal_class.var_name: isWordExpression
focal_class.declarator: locale
focal_class.modifier: private
focal_class.original_string: private Locale locale;
focal_class.type: Locale
focal_class.var_name: locale
focal_class.declarator: vowelExpression
focal_class.modifier: private
focal_class.original_string: private Pattern vowelExpression;
focal_class.type: Pattern
focal_class.var_name: vowelExpression
focal_class.declarator: wordstems
focal_class.modifier: private
focal_class.original_string: private List<String> wordstems;
focal_class.type: List<String>
focal_class.var_name: wordstems
focal_class.file: core/src/main/java/org/apache/sling/cms/core/readability/impl/ReadabilityServiceImpl.java
focal_class.identifier: ReadabilityServiceImpl
focal_class.interfaces: implements ReadabilityService
focal_class.class_method_signature: ReadabilityServiceImpl.activate(ReadabilityConfig config)
focal_class.full_signature: @Activate public void activate(ReadabilityConfig config)
focal_class.identifier: activate
focal_class.modifiers: @Activate public
focal_class.parameters: (ReadabilityConfig config)
focal_class.return: void
focal_class.signature: void activate(ReadabilityConfig config)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateARI(String text)
focal_class.full_signature: @Override public double calculateARI(String text)
focal_class.identifier: calculateARI
focal_class.modifiers: @Override public
focal_class.parameters: (String text)
focal_class.return: double
focal_class.signature: double calculateARI(String text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateARI(Text text)
focal_class.full_signature: @Override public double calculateARI(Text text)
focal_class.identifier: calculateARI
focal_class.modifiers: @Override public
focal_class.parameters: (Text text)
focal_class.return: double
focal_class.signature: double calculateARI(Text text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateAverageGradeLevel(String text)
focal_class.full_signature: @Override public double calculateAverageGradeLevel(String text)
focal_class.identifier: calculateAverageGradeLevel
focal_class.modifiers: @Override public
focal_class.parameters: (String text)
focal_class.return: double
focal_class.signature: double calculateAverageGradeLevel(String text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateAverageGradeLevel(Text text)
focal_class.full_signature: @Override public double calculateAverageGradeLevel(Text text)
focal_class.identifier: calculateAverageGradeLevel
focal_class.modifiers: @Override public
focal_class.parameters: (Text text)
focal_class.return: double
focal_class.signature: double calculateAverageGradeLevel(Text text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateColemanLiauIndex(String text)
focal_class.full_signature: @Override public double calculateColemanLiauIndex(String text)
focal_class.identifier: calculateColemanLiauIndex
focal_class.modifiers: @Override public
focal_class.parameters: (String text)
focal_class.return: double
focal_class.signature: double calculateColemanLiauIndex(String text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateColemanLiauIndex(Text text)
focal_class.full_signature: @Override public double calculateColemanLiauIndex(Text text)
focal_class.identifier: calculateColemanLiauIndex
focal_class.modifiers: @Override public
focal_class.parameters: (Text text)
focal_class.return: double
focal_class.signature: double calculateColemanLiauIndex(Text text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateFleschKincaidGradeLevel(String text)
focal_class.full_signature: @Override public double calculateFleschKincaidGradeLevel(String text)
focal_class.identifier: calculateFleschKincaidGradeLevel
focal_class.modifiers: @Override public
focal_class.parameters: (String text)
focal_class.return: double
focal_class.signature: double calculateFleschKincaidGradeLevel(String text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateFleschKincaidGradeLevel(Text text)
focal_class.full_signature: @Override public double calculateFleschKincaidGradeLevel(Text text)
focal_class.identifier: calculateFleschKincaidGradeLevel
focal_class.modifiers: @Override public
focal_class.parameters: (Text text)
focal_class.return: double
focal_class.signature: double calculateFleschKincaidGradeLevel(Text text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateFleschReadingEase(String text)
focal_class.full_signature: @Override public double calculateFleschReadingEase(String text)
focal_class.identifier: calculateFleschReadingEase
focal_class.modifiers: @Override public
focal_class.parameters: (String text)
focal_class.return: double
focal_class.signature: double calculateFleschReadingEase(String text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateFleschReadingEase(Text text)
focal_class.full_signature: @Override public double calculateFleschReadingEase(Text text)
focal_class.identifier: calculateFleschReadingEase
focal_class.modifiers: @Override public
focal_class.parameters: (Text text)
focal_class.return: double
focal_class.signature: double calculateFleschReadingEase(Text text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateGunningFog(String text)
focal_class.full_signature: @Override public double calculateGunningFog(String text)
focal_class.identifier: calculateGunningFog
focal_class.modifiers: @Override public
focal_class.parameters: (String text)
focal_class.return: double
focal_class.signature: double calculateGunningFog(String text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateGunningFog(Text text)
focal_class.full_signature: @Override public double calculateGunningFog(Text text)
focal_class.identifier: calculateGunningFog
focal_class.modifiers: @Override public
focal_class.parameters: (Text text)
focal_class.return: double
focal_class.signature: double calculateGunningFog(Text text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateSMOG(String text)
focal_class.full_signature: @Override public double calculateSMOG(String text)
focal_class.identifier: calculateSMOG
focal_class.modifiers: @Override public
focal_class.parameters: (String text)
focal_class.return: double
focal_class.signature: double calculateSMOG(String text)
focal_class.class_method_signature: ReadabilityServiceImpl.calculateSMOG(Text text)
focal_class.full_signature: @Override public double calculateSMOG(Text text)
focal_class.identifier: calculateSMOG
focal_class.modifiers: @Override public
focal_class.parameters: (Text text)
focal_class.return: double
focal_class.signature: double calculateSMOG(Text text)
focal_class.class_method_signature: ReadabilityServiceImpl.countSylables(String word)
focal_class.full_signature: private int countSylables(String word)
focal_class.identifier: countSylables
focal_class.modifiers: private
focal_class.parameters: (String word)
focal_class.return: int
focal_class.signature: int countSylables(String word)
focal_class.class_method_signature: ReadabilityServiceImpl.deduplicateVowels(String word)
focal_class.full_signature: private String deduplicateVowels(String word)
focal_class.identifier: deduplicateVowels
focal_class.modifiers: private
focal_class.parameters: (String word)
focal_class.return: String
focal_class.signature: String deduplicateVowels(String word)
focal_class.class_method_signature: ReadabilityServiceImpl.extractSentences(String input)
focal_class.full_signature: @Override public Text extractSentences(String input)
focal_class.identifier: extractSentences
focal_class.modifiers: @Override public
focal_class.parameters: (String input)
focal_class.return: Text
focal_class.signature: Text extractSentences(String input)
focal_class.class_method_signature: ReadabilityServiceImpl.extractWords(String sentence)
focal_class.full_signature: private List<Word> extractWords(String sentence)
focal_class.identifier: extractWords
focal_class.modifiers: private
focal_class.parameters: (String sentence)
focal_class.return: List<Word>
focal_class.signature: List<Word> extractWords(String sentence)
focal_class.class_method_signature: ReadabilityServiceImpl.getLocale()
focal_class.full_signature: @Override public Locale getLocale()
focal_class.identifier: getLocale
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Locale
focal_class.signature: Locale getLocale()
focal_class.class_method_signature: ReadabilityServiceImpl.isVowel(char ch)
focal_class.full_signature: private boolean isVowel(char ch)
focal_class.identifier: isVowel
focal_class.modifiers: private
focal_class.parameters: (char ch)
focal_class.return: boolean
focal_class.signature: boolean isVowel(char ch)
focal_class.class_method_signature: ReadabilityServiceImpl.stripWordStem(String wordStr)
focal_class.full_signature: private String stripWordStem(String wordStr)
focal_class.identifier: stripWordStem
focal_class.modifiers: private
focal_class.parameters: (String wordStr)
focal_class.return: String
focal_class.signature: String stripWordStem(String wordStr)
focal_method.body: @Override
      public double calculateFleschKincaidGradeLevel(String text) {
          return calculateFleschKincaidGradeLevel(extractSentences(text));
      }
focal_method.class_method_signature: ReadabilityServiceImpl.calculateFleschKincaidGradeLevel(String text)
focal_method.full_signature: @Override public double calculateFleschKincaidGradeLevel(String text)
focal_method.identifier: calculateFleschKincaidGradeLevel
focal_method.invocations: calculateFleschKincaidGradeLevel extractSentences
focal_method.modifiers: @Override public
focal_method.parameters: (String text)
focal_method.return: double
focal_method.signature: double calculateFleschKincaidGradeLevel(String text)