From 6ca64b5cf2d4c0c2698d4298e88dde274f766ac4 Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 13 Aug 2010 03:30:49 +0000 Subject: 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 --- decoder/cfg.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'decoder/cfg.h') 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 Ruleids; void print_nt_name(std::ostream &o,NTHandle n) const { - o << nts[n].from; + o << nts[n].from << n; } typedef std::pair 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 NTs; + NTs nts; + typedef std::vector 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 Rules; - Rules rules; - typedef std::vector NTs; - NTs nts; - int goal_nt; }; inline void swap(CFG &a,CFG &b) { -- cgit v1.2.3