System.out.println("############Process sentence " + sent_id);
start_time = System.currentTimeMillis();
sent_id++;
//if(sent_id>10)break;
HyperGraph hg = dhg_read.readHyperGraph();
if(hg==null)continue;
double orc_bleu=0;
//System.out.println("read disk hyp: " + (System.currentTimeMillis()-start_time));
time_on_reading += System.currentTimeMillis()-start_time;
start_time = System.currentTimeMillis();
if(orc_extract_nbest){
Object[] res = orc_extractor.oracleExtractOnNbest(kbestExtractor, hg, topN, do_ngram_clip_nbest, ref_sent);
String orc_sent = (String) res[0];
orc_bleu = (Double) res[1];
orc_out.write(orc_sent+"\n");
}else{
HyperGraph hg_oracle = orc_extractor.oracleExtractOnHG(hg, hg.sentLen, lm_order, ref_sent);
oracleKbestExtractor.lazyKBestExtractOnHG(hg_oracle, null, topKOracles, hg.sentID, orc_out);
orc_bleu = hg_oracle.goalNode.bestHyperedge.bestDerivationLogP;
time_on_orc_extract += System.currentTimeMillis()-start_time;
//System.out.println("num_virtual_items: " + orc_extractor.numRefinedNodes + " num_virtual_dts: " + orc_extractor.numRefinedEdges);
//System.out.println("oracle extract: " + (System.currentTimeMillis()-start_time));