NbestCrunching cruncher = new NbestCrunching(symbolTbl, insideOutsideScalingFactor, topN);
BufferedWriter onebestWriter = FileUtilityOld.getWriteFileStream(onebestFile);
System.out.println("############Process file " + testItemsFile);
DiskHyperGraph diskHG = new DiskHyperGraph(symbolTbl, ngramStateID, true, null); //have model costs stored
diskHG.initRead(testItemsFile, testRulesFile,null);
for(int sentID=0; sentID < numSents; sentID ++){
System.out.println("#Process sentence " + sentID);
HyperGraph testHG = diskHG.readHyperGraph();
List<String> oneBest = cruncher.processOneSent(testHG, sentID, false);//produce the reranked onebest
FileUtilityOld.writeLzf(onebestWriter, oneBest.get(0) + "\n");
}
FileUtilityOld.closeWriteFile(onebestWriter);
}