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/cdec.cc | 2 +- decoder/cfg.cc | 12 +++++++++++- decoder/cfg.h | 3 ++- decoder/cfg_binarize.h | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) (limited to 'decoder') diff --git a/decoder/cdec.cc b/decoder/cdec.cc index 0a02801e..b156c268 100644 --- a/decoder/cdec.cc +++ b/decoder/cdec.cc @@ -379,7 +379,7 @@ void maybe_prune(Hypergraph &forest,po::variables_map const& conf,string nbeam,s } forest.PruneInsideOutside(beam_prune,density_prune,pm,false,1,conf["promise_power"].as()); if (!forestname.empty()) forestname=" "+forestname; - forest_stats(forest," Pruned "+forestname+" forest",false,false,false); + forest_stats(forest," Pruned "+forestname+" forest",false,false,0,false); cerr << " Pruned "<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") < NTs; NTs nts; diff --git a/decoder/cfg_binarize.h b/decoder/cfg_binarize.h index 41eba11b..ae06f8bf 100755 --- a/decoder/cfg_binarize.h +++ b/decoder/cfg_binarize.h @@ -37,8 +37,8 @@ struct CFGBinarize { } void Validate() { if (bin_thresh>0&&!bin_l2r) { - std::cerr<<"\nWARNING: greedy binarization not yet supported; using l2r (right branching) instead.\n"; - bin_l2r=true; +// std::cerr<<"\nWARNING: greedy binarization not yet supported; using l2r (right branching) instead.\n"; +// bin_l2r=true; } if (false && bin_l2r && bin_split) { // actually, split may be slightly incomplete due to finite number of passes. std::cerr<<"\nWARNING: l2r and split are both complete binarization and redundant. Using split.\n"; -- cgit v1.2.3