summaryrefslogtreecommitdiff
path: root/decoder/cdec.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-18 23:33:03 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-18 23:33:03 +0000
commit9b2da83a560931baab56b73214793b8b664a2689 (patch)
tree942059838fe820527f6df942c38b822b6cf88eab /decoder/cdec.cc
parent241a0317966f00546aaf3b5c02c137097cfaccda (diff)
boost cmd line notify(conf) was missing
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@313 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cdec.cc')
-rw-r--r--decoder/cdec.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/decoder/cdec.cc b/decoder/cdec.cc
index 8827cce3..a9c1cb3b 100644
--- a/decoder/cdec.cc
+++ b/decoder/cdec.cc
@@ -91,7 +91,7 @@ void print_options(std::ostream &out,po::options_description const& opts) {
}
-void InitCommandLine(int argc, char** argv, po::variables_map* confp) {
+void InitCommandLine(int argc, char** argv, OracleBleu &ob, po::variables_map* confp) {
po::variables_map &conf=*confp;
po::options_description opts("Configuration options");
opts.add_options()
@@ -151,7 +151,7 @@ void InitCommandLine(int argc, char** argv, po::variables_map* confp) {
("combine_size,C",po::value<int>()->default_value(1), "When option -G is used, process this many sentence pairs before writing the gradient (1=emit after every sentence pair)")
("forest_output,O",po::value<string>(),"Directory to write forests to")
("minimal_forests,m","Write minimal forests (excludes Rule information). Such forests can be used for ML/MAP training, but not rescoring, etc.");
- OracleBleu::AddOptions(&opts);
+ ob.AddOptions(&opts);
po::options_description clo("Command line options");
clo.add_options()
("config,c", po::value<string>(), "Configuration file")
@@ -206,6 +206,8 @@ void InitCommandLine(int argc, char** argv, po::variables_map* confp) {
cerr << dcmdline_options << endl;
exit(1);
}
+ po::notify(conf);
+
}
// TODO move out of cdec into some sampling decoder file
@@ -358,7 +360,9 @@ int main(int argc, char** argv) {
global_ff_registry.reset(new FFRegistry);
register_feature_functions();
po::variables_map conf;
- InitCommandLine(argc, argv, &conf);
+ OracleBleu oracle;
+
+ InitCommandLine(argc, argv, oracle, &conf);
const bool write_gradient = conf.count("cll_gradient");
const bool feature_expectations = conf.count("feature_expectations");
if (write_gradient && feature_expectations) {
@@ -488,7 +492,6 @@ int main(int argc, char** argv) {
const bool crf_uniform_empirical = conf.count("crf_uniform_empirical");
const bool get_oracle_forest = conf.count("get_oracle_forest");
- OracleBleu oracle;
if (get_oracle_forest)
oracle.UseConf(conf);