예제 #1
0
 public static float syllablesPerWords(final Stats stats) {
   return ((float) stats.getNumSyllables()) / stats.getNumWords();
 }
예제 #2
0
 public static float wordsPerSentence(final Stats stats) {
   return ((float) stats.getNumWords()) / stats.getNumSentences();
 }
예제 #3
0
 public static float percentComplexWords(final Stats stats) {
   return (((float) stats.getNumComplexWords()) / stats.getNumWords()) * 100;
 }
예제 #4
0
 /**
  * Michael O'Mahony
  *
  * <p>Computes SMOG readability measure.
  *
  * <p>A simple formula for estimating the difficulty of writing (see
  * http://simple.wikipedia.org/wiki/List_of_readability_tests).
  *
  * @param stats
  * @return SMOG score.
  */
 public static float calcSMOG(final Stats stats) {
   return 1.0430f * (float) Math.sqrt(stats.getNumComplexWords() * 30.0 / stats.getNumSentences())
       + 3.1291f;
 }