int g_sent_id=0;
for(int loop_id=0; loop_id<max_loop; loop_id++){
System.out.println("###################################Loop " + loop_id);
for(int fid=0; fid < l_file_train_items.size(); fid++){
System.out.println("############Process file id " + fid);
DiskHyperGraph dhg_train = new DiskHyperGraph(symbolTbl, ngramStateID, saveModelCosts, null);
dhg_train.initRead((String)l_file_train_items.get(fid), (String)l_file_train_rules.get(fid),tbl_sent_selected);
DiskHyperGraph dhg_orc =null;
BufferedReader t_reader_orc =null;
if(l_file_orc_rules!=null){
dhg_orc = new DiskHyperGraph(symbolTbl, ngramStateID, saveModelCosts, null);
dhg_orc.initRead((String)l_file_orc_items.get(fid), (String)l_file_orc_rules.get(fid), tbl_sent_selected);
}else{
t_reader_orc = FileUtilityOld.getReadFileStream((String)l_file_orc_items.get(fid),"UTF-8");
}
int total_num_sent = new Integer((String)l_num_sents.get(fid));
for(int sent_id=0; sent_id < total_num_sent; sent_id ++){
System.out.println("#Process sentence " + g_sent_id);
HyperGraph hg_train = dhg_train.readHyperGraph();
HyperGraph hg_orc =null;
String hyp_oracle =null;
if(l_file_orc_rules!=null)
hg_orc = dhg_orc.readHyperGraph();
else
hyp_oracle = FileUtilityOld.readLineLzf(t_reader_orc);
if(hg_train!=null){//sent is not skipped
if(l_file_orc_rules!=null)
hgdl.processOneSent( hg_train, hg_orc, null, l_feat_templates, l_feat_templates_nobaseline);