@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!"); }
@Override public double calculateFleschKincaidGradeLevel(String text) { return calculateFleschKincaidGradeLevel(extractSentences(text)); }
ReadabilityServiceImpl implements ReadabilityService { @Override public double calculateFleschKincaidGradeLevel(String text) { return calculateFleschKincaidGradeLevel(extractSentences(text)); } }
ReadabilityServiceImpl implements ReadabilityService { @Override public double calculateFleschKincaidGradeLevel(String text) { return calculateFleschKincaidGradeLevel(extractSentences(text)); }  }
ReadabilityServiceImpl implements ReadabilityService { @Override public double calculateFleschKincaidGradeLevel(String text) { return calculateFleschKincaidGradeLevel(extractSentences(text)); }  @Activate void activate(ReadabilityConfig config); @Override double calculateARI(String text); @Override double calculateARI(Text text); @Override double calculateAverageGradeLevel(String text); @Override double calculateAverageGradeLevel(Text text); @Override double calculateColemanLiauIndex(String text); @Override double calculateColemanLiauIndex(Text text); @Override double calculateFleschKincaidGradeLevel(String text); @Override double calculateFleschKincaidGradeLevel(Text text); @Override double calculateFleschReadingEase(String text); @Override double calculateFleschReadingEase(Text text); @Override double calculateGunningFog(String text); @Override double calculateGunningFog(Text text); @Override double calculateSMOG(String text); @Override double calculateSMOG(Text text); @Override Text extractSentences(String input); @Override Locale getLocale(); }
ReadabilityServiceImpl implements ReadabilityService { @Override public double calculateFleschKincaidGradeLevel(String text) { return calculateFleschKincaidGradeLevel(extractSentences(text)); }  @Activate void activate(ReadabilityConfig config); @Override double calculateARI(String text); @Override double calculateARI(Text text); @Override double calculateAverageGradeLevel(String text); @Override double calculateAverageGradeLevel(Text text); @Override double calculateColemanLiauIndex(String text); @Override double calculateColemanLiauIndex(Text text); @Override double calculateFleschKincaidGradeLevel(String text); @Override double calculateFleschKincaidGradeLevel(Text text); @Override double calculateFleschReadingEase(String text); @Override double calculateFleschReadingEase(Text text); @Override double calculateGunningFog(String text); @Override double calculateGunningFog(Text text); @Override double calculateSMOG(String text); @Override double calculateSMOG(Text text); @Override Text extractSentences(String input); @Override Locale getLocale();  }