From f80891a7c4a2834efc476ce4d29cc6c438e567f0 Mon Sep 17 00:00:00 2001 From: graehl Date: Wed, 21 Jul 2010 20:12:44 +0000 Subject: Score::Clone() via CRTP git-svn-id: https://ws10smt.googlecode.com/svn/trunk@360 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/cdec.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'decoder/cdec.cc') diff --git a/decoder/cdec.cc b/decoder/cdec.cc index cc0b1434..6fb6d5a1 100644 --- a/decoder/cdec.cc +++ b/decoder/cdec.cc @@ -154,7 +154,7 @@ void InitCommandLine(int argc, char** argv, OracleBleu &ob, po::variables_map* c ob.AddOptions(&opts); po::options_description clo("Command line options"); clo.add_options() - ("config,c", po::value(), "Configuration file") + ("config,c", po::value >(), "Configuration file(s) - latest has priority") ("help,h", "Print this help message and exit") ("usage,u", po::value(), "Describe a feature function type") ("compgen", "Print just option names suitable for bash command line completion builtin 'compgen'") @@ -172,10 +172,14 @@ void InitCommandLine(int argc, char** argv, OracleBleu &ob, po::variables_map* c } ShowBanner(); if (conf.count("config")) { - const string cfg = str("config",conf); - cerr << "Configuration file: " << cfg << endl; - ifstream config(cfg.c_str()); - po::store(po::parse_config_file(config, dconfig_options), conf); + typedef vector Cs; + Cs cs=conf["config"].as(); + for (int i=0;i