public NGramFrequencyMap extractFreqs(Text annotations) { String text; if (removeStopWords) { List<Sentence> noStopwordsText = removeStopwords(annotations); text = ""; for (Sentence sent : noStopwordsText) { text = text + " " + sent.getConcatTokens(); } text = text.trim(); } else text = annotations.toString(); return extractFreqs(text); }