diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-13 03:30:49 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-13 03:30:49 +0000 |
commit | 6ca64b5cf2d4c0c2698d4298e88dde274f766ac4 (patch) | |
tree | c37af6ea1ae5159b8bea55a94b120359ba9188c3 /decoder/cfg.h | |
parent | e1458e933f41a95bb5f98aeffbc15242ef7752f1 (diff) |
named_enum, itoa, cdec replace --a-b=x with --a_b=x
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@536 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cfg.h')
-rwxr-xr-x | decoder/cfg.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/decoder/cfg.h b/decoder/cfg.h index 64924f14..e1f818e8 100755 --- a/decoder/cfg.h +++ b/decoder/cfg.h @@ -40,11 +40,10 @@ struct CFG { typedef std::vector<RuleHandle> Ruleids; void print_nt_name(std::ostream &o,NTHandle n) const { - o << nts[n].from; + o << nts[n].from << n; } typedef std::pair<int,int> BinRhs; - WordID BinName(BinRhs const& b); struct Rule { // for binarizing - no costs/probs @@ -106,16 +105,17 @@ struct CFG { swap(goal_nt,o.goal_nt); } void Binarize(CFGBinarize const& binarize_options); + + typedef std::vector<NT> NTs; + NTs nts; + typedef std::vector<Rule> Rules; + Rules rules; + int goal_nt; + prob_t goal_inside,pushed_inside; // when we push viterbi weights to goal, we store the removed probability in pushed_inside protected: bool uninit; 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 // rules/nts will have same index as hg edges/nodes - typedef std::vector<Rule> Rules; - Rules rules; - typedef std::vector<NT> NTs; - NTs nts; - int goal_nt; }; inline void swap(CFG &a,CFG &b) { |