count++;
ngrams.adjustOrPutValue(term, 1, 1);
} else if (emitUnigrams && term.length() > 0) { // unigram
unigrams.adjustOrPutValue(term, 1, 1);
}
} while (sf.incrementToken());
try {
final GramKey gramKey = new GramKey();
ngrams.forEachPair(new ObjectIntProcedure<String>() {