diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-10 02:29:56 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-10 02:29:56 +0000 |
commit | 52c656a62d05135cf6ffd80249d5a44a07a40816 (patch) | |
tree | 7f9c7b0862dc02f2a0b3fbe2c6d6d4c3da9322f7 /decoder/cfg.h | |
parent | 4f99f17541c1fe104afbcf04e3d8d04ad9f1227a (diff) |
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
Diffstat (limited to 'decoder/cfg.h')
-rwxr-xr-x | decoder/cfg.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/decoder/cfg.h b/decoder/cfg.h index 9e1b2837..8d7a5eee 100755 --- a/decoder/cfg.h +++ b/decoder/cfg.h @@ -27,9 +27,7 @@ #include "small_vector.h" class Hypergraph; -class CFG; - - +class CFGFormat; // #include "cfg_format.h" struct CFG { typedef int RuleHandle; @@ -48,7 +46,7 @@ struct CFG { }; struct NT { - Ruleids ruleids; // index into CFG rules with this lhs + Ruleids ruleids; // index into CFG rules with lhs = this NT. aka in_edges_ }; CFG() : hg_() { } @@ -58,6 +56,7 @@ struct CFG { Init(hg,target_side,copy_features,push_weights); } void Init(Hypergraph const& hg,bool target_side=true,bool copy_features=false,bool push_weights=true); + void Print(std::ostream &o,CFGFormat const& format) const; // see cfg_format.h protected: Hypergraph const* hg_; // shouldn't be used for anything, esp. after binarization prob_t goal_inside,pushed_inside; // when we push viterbi weights to goal, we store the removed probability in pushed_inside @@ -66,6 +65,7 @@ protected: Rules rules; typedef std::vector<NT> NTs; NTs nts; + int goal_nt; }; #endif |