From 52c656a62d05135cf6ffd80249d5a44a07a40816 Mon Sep 17 00:00:00 2001 From: graehl Date: Tue, 10 Aug 2010 02:29:56 +0000 Subject: parse trule(string) using lexer - needs testing, affects earley_composer git-svn-id: https://ws10smt.googlecode.com/svn/trunk@497 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cfg.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'decoder/cfg.cc') diff --git a/decoder/cfg.cc b/decoder/cfg.cc index 0f20ba0f..b83fc54d 100755 --- a/decoder/cfg.cc +++ b/decoder/cfg.cc @@ -1,5 +1,6 @@ #include "cfg.h" #include "hg.h" +#include "cfg_format.h" using namespace std; @@ -10,6 +11,7 @@ void CFG::Init(Hypergraph const& hg,bool target_side,bool copy_features,bool pus pushed_inside=push_weights ? goal_inside : prob_t(1); int nn=hg.nodes_.size(),ne=hg.edges_.size(); nts.resize(nn); + goal_nt=nn-1; rules.resize(ne); for (int i=0;i