diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-17 22:05:59 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-17 22:05:59 +0000 |
commit | addc7291bd44db96a01f399f8ee4efbe226245e2 (patch) | |
tree | f21c713ea6a3e5b95a3e28ffdc18be0bc2a5faf1 /decoder/cfg.cc | |
parent | 06d0d5cc15bfc18748030b1ddcf5329d850a76f1 (diff) |
vest generate / map vector print / read compatability
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@585 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cfg.cc')
-rwxr-xr-x | decoder/cfg.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/decoder/cfg.cc b/decoder/cfg.cc index f51da9bf..c02f46ec 100755 --- a/decoder/cfg.cc +++ b/decoder/cfg.cc @@ -10,7 +10,7 @@ #include "show.h" #define DUNIQ(x) x -#define DBIN(x) x +#define DBIN(x) #define DSP(x) x //SP:binarize by splitting. #define DCFG(x) IF_CFG_DEBUG(x) @@ -464,6 +464,8 @@ void CFG::BinarizeSplit(CFGBinarize const& b) { void CFG::Binarize(CFGBinarize const& b) { if (!b.Binarizing()) return; cerr << "Binarizing "<<b<<endl; + if (b.bin_thresh>0) + BinarizeThresh(b); if (b.bin_split) BinarizeSplit(b); if (b.bin_l2r) @@ -473,6 +475,14 @@ void CFG::Binarize(CFGBinarize const& b) { } +namespace { +} + +void CFG::BinarizeThresh(CFGBinarize const& b) { + throw runtime_error("TODO: some fancy linked list thing - see NOTES.partial.binarize"); +} + + void CFG::BinarizeL2R(bool bin_unary,bool name) { add_virtual_rules<BinRhs> v(*this,name); cerr << "Binarizing left->right " << (bin_unary?"real to unary":"stop at binary") <<endl; |