summaryrefslogtreecommitdiff
path: root/decoder/cfg.h
diff options
context:
space:
mode:
authorgraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-16 09:11:03 +0000
committergraehl@gmail.com <graehl@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-16 09:11:03 +0000
commit708e59d0e908b24bac36ec36956ad013268253b0 (patch)
treeb568b7afc5b9012aed8595821c3ef4daa4dbffde /decoder/cfg.h
parentd523a48ff2a7097ec5c33054af82f9395774d2d2 (diff)
greedy binarization - needs testing, may have broke l2r
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@560 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cfg.h')
-rwxr-xr-xdecoder/cfg.h4
1 files changed, 4 insertions, 0 deletions
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<NT> NTs;
NTs nts;