From addc7291bd44db96a01f399f8ee4efbe226245e2 Mon Sep 17 00:00:00 2001 From: graehl Date: Tue, 17 Aug 2010 22:05:59 +0000 Subject: vest generate / map vector print / read compatability git-svn-id: https://ws10smt.googlecode.com/svn/trunk@585 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cfg.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'decoder/cfg.cc') 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 "<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 v(*this,name); cerr << "Binarizing left->right " << (bin_unary?"real to unary":"stop at binary") <