Configuration conf = IntegrationUtils.getBespinConfiguration();
FileSystem fs = FileSystem.get(conf);
SequenceFile.Reader reader;
IntWritable key = new IntWritable();
WeightedIntDocVector value = new WeightedIntDocVector();
HMapIFW map = new HMapIFW();
reader = new SequenceFile.Reader(fs.getConf(),
SequenceFile.Reader.file(new Path(opennlpIndex + "/test_wt-int-doc-vectors/part-00000")));
reader.next(key, value);
map = value.getWeightedTerms();
System.out.println("*** top 10 terms ***");
for ( MapIF.Entry entry : map.getEntriesSortedByValue(10)) {
System.out.println(entry.getKey() + ": " + entry.getValue());
}
verifyIntDocVector(opennlpIntDocVector1, value);
reader.next(key, value);
map = value.getWeightedTerms();
System.out.println("*** top 10 terms ***");
for ( MapIF.Entry entry : map.getEntriesSortedByValue(10)) {
System.out.println(entry.getKey() + ": " + entry.getValue());
}
verifyIntDocVector(opennlpIntDocVector2, value);