diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-09-13 04:04:17 -0700 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-09-13 04:04:17 -0700 |
commit | 8d0baa1dfb5c18f5be45b4d12b3f925dc04afc48 (patch) | |
tree | af96b81bfa50321d36a02bc036eabfeb29c32538 /decoder/decoder.cc | |
parent | a548c46f3d636093d26f44d5b7642c98def6f351 (diff) | |
parent | 816f33174b2c2938a3df9c75b2834da6f5184a3e (diff) |
Merge branch 'master' of github.com:kpu/cdec
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r-- | decoder/decoder.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index a69a6d05..3a410cf2 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -38,6 +38,7 @@ #include "sampler.h" #include "forest_writer.h" // TODO this section should probably be handled by an Observer +#include "lazy.h" #include "hg_io.h" #include "aligner.h" @@ -832,6 +833,9 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { if (conf.count("show_target_graph")) HypergraphIO::WriteTarget(conf["show_target_graph"].as<string>(), sent_id, forest); + if (conf.count("lazy_search")) + PassToLazy(forest, CurrentWeightVector()); + for (int pass = 0; pass < rescoring_passes.size(); ++pass) { const RescoringPass& rp = rescoring_passes[pass]; const vector<weight_t>& cur_weights = *rp.weight_vector; |