// Extract tf and doclen information from document vectors.
TfDoclengthStatistics stats = null;
try {
stats = getTfDoclengthStatistics(docVecs);
} catch (IOException e) {
throw new RetrievalException(
"Error: Unable to extract tf and doclen information from document vectors!");
}
VocabFrequencyPair[] vocab = stats.getVocab();
Map<String, Short>[] tfs = stats.getTfs();