From b5bd75ab4a66e61e724fcb9488d164a3936a6b4e Mon Sep 17 00:00:00 2001 From: graehl Date: Wed, 11 Aug 2010 01:08:50 +0000 Subject: cout< const& rule_rhs=target_side?er.e():er.f(); RHS &rhs=cfgr.rhs; - int nr=rule_rhs.size(); - rhs.resize(nr); prob_t &crp=cfgr.p; crp=e.edge_prob_; cfgr.lhs=e.head_node_; @@ -46,6 +44,8 @@ void CFG::Init(Hypergraph const& hg,bool target_side,bool copy_features,bool pus #endif if (copy_features) cfgr.f=e.feature_values_; if (push_weights) crp /=np[e.head_node_]; + int nr=rule_rhs.size(); + rhs.resize(nr); for (int j=0;j0) @@ -71,6 +71,9 @@ void CFG::PrintRule(std::ostream &o,RuleHandle rulei,CFGFormat const& f) const { f.print_lhs(o,*this,r.lhs); f.print_rhs(o,*this,r.rhs.begin(),r.rhs.end()); f.print_features(o,r.p,r.f); +#if CFG_DEBUG + o<