diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-17 21:32:21 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-17 21:32:21 +0000 |
commit | 9846d040aa08a05ec3567fae40677ac87eadbcb8 (patch) | |
tree | f383ad82f37ea35dab5dfa4834e1c20395fbf59a | |
parent | 5dbc31da4d854dd4d7780bf33b1eb0c7486933e8 (diff) |
fix to make work, plus avoid bug in ast_csore
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@309 ec762483-ff6d-05da-a07a-a48fb63a330f
-rw-r--r-- | vest/fast_score.cc | 2 | ||||
-rw-r--r-- | vest/mr_vest_generate_mapper_input.cc | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/vest/fast_score.cc b/vest/fast_score.cc index cf743b4f..0d611d56 100644 --- a/vest/fast_score.cc +++ b/vest/fast_score.cc @@ -47,7 +47,7 @@ int main(int argc, char** argv) { while(in) { string line; getline(in, line); - if (line.empty()) continue; + if (line.empty() && !in) break; vector<WordID> sent; TD::ConvertSentence(line, &sent); Score* sentscore = ds[lc]->ScoreCandidate(sent); diff --git a/vest/mr_vest_generate_mapper_input.cc b/vest/mr_vest_generate_mapper_input.cc index 440eca95..50e620f8 100644 --- a/vest/mr_vest_generate_mapper_input.cc +++ b/vest/mr_vest_generate_mapper_input.cc @@ -118,6 +118,10 @@ struct oracle_directions { cerr << dcmdline_options << endl; exit(1); } + dev_set_size = (*conf)["dev_set_size"].as<unsigned>(); + forest_repository = (*conf)["forest_repository"].as<string>(); + weights_file = (*conf)["weights"].as<string>(); + n_random = (*conf)["random_directions"].as<unsigned>(); } int main(int argc, char *argv[]) { @@ -130,8 +134,8 @@ struct oracle_directions { void Run() { AddPrimaryAndRandomDirections(); - AddOracleDirections(); - compress_similar(directions,max_similarity); + //AddOracleDirections(); + //compress_similar(directions,max_similarity); Print(); } @@ -139,6 +143,7 @@ struct oracle_directions { Point origin; // old weights that gave model 1best. vector<string> optimize_features; void UseConf(po::variables_map const& conf) { +#if 0 oracle.UseConf(conf); include_primary=!conf.count("no_primary"); @@ -156,7 +161,7 @@ struct oracle_directions { // oracle_batch=conf["oracle_batch"].as<unsigned>(); // max_similarity=conf["max_similarity"].as<double>(); // weights_file=conf["weights"].as<string>(); - +#endif Init(); } @@ -184,6 +189,7 @@ struct oracle_directions { //TODO: compute doc bleu stats for each sentence, then when getting oracle temporarily exclude stats for that sentence (skip regular score updating) } start_random=false; + cerr << "Forest repo: " << forest_repository << endl; assert(DirectoryExists(forest_repository)); vector<string> features; weights.InitFromFile(weights_file, &features); |