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 | 52aab129e132d28c352d8ccf1b3bc9f589b8608e (patch) | |
tree | f716a0b909c77b0b562d169de32929ea27a7bb86 /vest | |
parent | 791da7f9fcb6667cb46f59e5ed1efa527ef885a7 (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
Diffstat (limited to 'vest')
-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); |