@Test public void testDale_chall_grade() { logger.info("dale_chall_grade"); String strText = TEST_STRING; double expResult = 16.0; double result = ReadabilityStatistics.daleChallGrade(strText); assertEquals(expResult, result, Constants.DOUBLE_ACCURACY_HIGH); }
public static double daleChallGrade(String strText) { double score=daleChallScore(strText); if(score<5.0) { return 2.5; } else if(score<6.0) { return 5.5; } else if(score<7.0) { return 7.5; } else if(score<8.0) { return 9.5; } else if(score<9.0) { return 11.5; } else if(score<10.0) { return 14.0; } else { return 16.0; } }
ReadabilityStatistics { public static double daleChallGrade(String strText) { double score=daleChallScore(strText); if(score<5.0) { return 2.5; } else if(score<6.0) { return 5.5; } else if(score<7.0) { return 7.5; } else if(score<8.0) { return 9.5; } else if(score<9.0) { return 11.5; } else if(score<10.0) { return 14.0; } else { return 16.0; } } }
ReadabilityStatistics { public static double daleChallGrade(String strText) { double score=daleChallScore(strText); if(score<5.0) { return 2.5; } else if(score<6.0) { return 5.5; } else if(score<7.0) { return 7.5; } else if(score<8.0) { return 9.5; } else if(score<9.0) { return 11.5; } else if(score<10.0) { return 14.0; } else { return 16.0; } }  }
ReadabilityStatistics { public static double daleChallGrade(String strText) { double score=daleChallScore(strText); if(score<5.0) { return 2.5; } else if(score<6.0) { return 5.5; } else if(score<7.0) { return 7.5; } else if(score<8.0) { return 9.5; } else if(score<9.0) { return 11.5; } else if(score<10.0) { return 14.0; } else { return 16.0; } }  static double fleschKincaidReadingEase(String strText); static double fleschKincaidGradeLevel(String strText); static double gunningFogScore(String strText); static double colemanLiauIndex(String strText); static double smogIndex(String strText); static double automatedReadabilityIndex(String strText); static double daleChallScore(String strText); static double daleChallGrade(String strText); static double spacheScore(String strText); }
ReadabilityStatistics { public static double daleChallGrade(String strText) { double score=daleChallScore(strText); if(score<5.0) { return 2.5; } else if(score<6.0) { return 5.5; } else if(score<7.0) { return 7.5; } else if(score<8.0) { return 9.5; } else if(score<9.0) { return 11.5; } else if(score<10.0) { return 14.0; } else { return 16.0; } }  static double fleschKincaidReadingEase(String strText); static double fleschKincaidGradeLevel(String strText); static double gunningFogScore(String strText); static double colemanLiauIndex(String strText); static double smogIndex(String strText); static double automatedReadabilityIndex(String strText); static double daleChallScore(String strText); static double daleChallGrade(String strText); static double spacheScore(String strText);  }