From 708e59d0e908b24bac36ec36956ad013268253b0 Mon Sep 17 00:00:00 2001 From: "graehl@gmail.com" Date: Mon, 16 Aug 2010 09:11:03 +0000 Subject: greedy binarization - needs testing, may have broke l2r git-svn-id: https://ws10smt.googlecode.com/svn/trunk@560 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cfg.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'decoder/cfg.h') diff --git a/decoder/cfg.h b/decoder/cfg.h index 90a5dd5a..5a418234 100755 --- a/decoder/cfg.h +++ b/decoder/cfg.h @@ -92,6 +92,8 @@ struct CFG { rhs[0]=binrhs.first; rhs[1]=binrhs.second; } + Rule(int lhs,RHS const& rhs) : lhs(lhs),rhs(rhs),p(1) { + } int lhs; // index into nts RHS rhs; @@ -302,7 +304,9 @@ struct CFG { ReorderNTs(o); } + void BinarizeL2R(bool bin_unary=false,bool name_nts=false); void Binarize(CFGBinarize const& binarize_options); // see cfg_binarize.h for docs + void BinarizeSplit(CFGBinarize const& binarize_options); // there may be many options affecting split. typedef std::vector NTs; NTs nts; -- cgit v1.2.3