diff options
author | Patrick Simianer <p@simianer.de> | 2011-11-23 21:39:36 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2011-11-23 21:39:36 +0100 |
commit | fe86d20720cedd2e9540637efcafe1715c001894 (patch) | |
tree | b5974768b7c65a098006ba78b17b0435130def8b /dtrain/dtrain.cc | |
parent | a0a109329c942ddc956205cc66ccac872fb8f222 (diff) |
alld pair sampling, removed unnecessary stuff from PRO
Diffstat (limited to 'dtrain/dtrain.cc')
-rw-r--r-- | dtrain/dtrain.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dtrain/dtrain.cc b/dtrain/dtrain.cc index 3d3aa2d3..1769c690 100644 --- a/dtrain/dtrain.cc +++ b/dtrain/dtrain.cc @@ -69,10 +69,9 @@ dtrain_init(int argc, char** argv, po::variables_map* cfg) cerr << "Wrong 'filter' param: '" << (*cfg)["filter"].as<string>() << "', use 'uniq' or 'no'." << endl; return false; } - if ((*cfg)["pair_sampling"].as<string>() != "all" - && (*cfg)["pair_sampling"].as<string>() != "5050" && (*cfg)["pair_sampling"].as<string>() != "108010" - && (*cfg)["pair_sampling"].as<string>() != "PRO") { - cerr << "Wrong 'pair_sampling' param: '" << (*cfg)["pair_sampling"].as<string>() << "', use 'all' or 'rand'." << endl; + string s = (*cfg)["pair_sampling"].as<string>(); + if (s != "all" && s != "5050" && s != "108010" && s != "PRO" && s != "alld") { + cerr << "Wrong 'pair_sampling' param: '" << (*cfg)["pair_sampling"].as<string>() << "'." << endl; return false; } if ((*cfg)["select_weights"].as<string>() != "last" @@ -390,6 +389,8 @@ main(int argc, char** argv) multpart108010(samples, pairs); if (pair_sampling == "PRO") PROsampling(samples, pairs); + if (pair_sampling == "alld") + all_pairs_discard(samples, pairs); npairs += pairs.size(); for (vector<pair<ScoredHyp,ScoredHyp> >::iterator it = pairs.begin(); |