From 242774be8f3e4c08d1406ca4ecc9abcc1ca7d190 Mon Sep 17 00:00:00 2001 From: graehl Date: Wed, 18 Aug 2010 21:08:40 +0000 Subject: show_weights show_config git-svn-id: https://ws10smt.googlecode.com/svn/trunk@592 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cdec.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/decoder/cdec.cc b/decoder/cdec.cc index b156c268..6b5543f8 100644 --- a/decoder/cdec.cc +++ b/decoder/cdec.cc @@ -46,6 +46,8 @@ using namespace std::tr1; using boost::shared_ptr; namespace po = boost::program_options; +bool show_config=false; +bool show_weights=false; bool verbose_feature_functions=true; // some globals ... @@ -145,6 +147,8 @@ void InitCommandLine(int argc, char** argv, OracleBleu &ob, po::variables_map* c ("scfg_no_hiero_glue_grammar,n", "No Hiero glue grammar (nb. by default the SCFG decoder adds Hiero glue rules)") ("scfg_default_nt,d",po::value()->default_value("X"),"Default non-terminal symbol in SCFG") ("scfg_max_span_limit,S",po::value()->default_value(10),"Maximum non-terminal span limit (except \"glue\" grammar)") + ("show_config", po::bool_switch(&show_config), "show contents of loaded -c config files. note: this will have to appear before the -c argument to take effect") + ("show_weights", po::bool_switch(&show_weights), "show effective feature weights") ("show_joshua_visualization,J", "Produce output compatible with the Joshua visualization tools") ("show_tree_structure", "Show the Viterbi derivation structure") ("show_expected_length", "Show the expected translation length under the model") @@ -207,8 +211,10 @@ void InitCommandLine(int argc, char** argv, OracleBleu &ob, po::variables_map* c for (int i=0;i