private int countWords(List<Sentence> sentences) { int count = 0; for (Sentence sentence : sentences) { count += wordLexer.tokenize(sentence).size(); } return count; }
private int countSyllables(List<Sentence> sentences) { int count = 0; for (Sentence sentence : sentences) { for (Word word : wordLexer.tokenize(sentence)) { count += syllableLexer.count(word); } } return count; }