diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-09 15:12:46 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-09 15:12:46 +0000 |
commit | 181d0932a42a6aae75df72c33a3428c368893a2f (patch) | |
tree | 09d9f1e882fb1bea62ebb86dd6d5d9af65a0963c /decoder | |
parent | b6b3036d3aab27f16c194862e9e537558787f435 (diff) |
exhaustive rather than cube, if ModelSet is stateless
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@195 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/apply_models.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/decoder/apply_models.cc b/decoder/apply_models.cc index 0b667de0..78f37e68 100644 --- a/decoder/apply_models.cc +++ b/decoder/apply_models.cc @@ -408,18 +408,17 @@ void ApplyModelSet(const Hypergraph& in, const ModelSet& models, const IntersectionConfiguration& config, Hypergraph* out) { - // TODO special handling when all models are stateless - if (config.algorithm == 1) { + if (models.stateless() && config.algorithm == 0) { + NoPruningRescorer ma(models, smeta, in, out); // avoid overhead of best-first when no state + ma.Apply(); + } else if (config.algorithm == 1) { int pl = config.pop_limit; if (pl > 100 && in.nodes_.size() > 80000) { - cerr << " Note: reducing pop_limit to " << pl << " for very large forest\n"; pl = 30; + cerr << " Note: reducing pop_limit to " << pl << " for very large forest\n"; } CubePruningRescorer ma(models, smeta, in, pl, out); ma.Apply(); - } else if (config.algorithm == 0) { - NoPruningRescorer ma(models, smeta, in, out); - ma.Apply(); } else { cerr << "Don't understand intersection algorithm " << config.algorithm << endl; exit(1); |