Map<String, Integer> vocab = Maps.newHashMap();
Map<String, Short>[] tfs = new HashMap[docVecs.length];
int[] doclens = new int[docVecs.length];
for (int i = 0; i < docVecs.length; i++) {
IntDocVector doc = docVecs[i];
Map<String, Short> docTfs = new HashMap<String, Short>();
int doclen = 0;
Reader dvReader = doc.getReader();
while (dvReader.hasMoreTerms()) {
int termid = dvReader.nextTerm();
String stem = env.getTermFromId(termid);
short tf = dvReader.getTf();