diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-02-29 12:58:53 -0800 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-02-29 12:58:53 -0800 |
commit | e1a0c140e9f31461ab45ec7f9533ad98d2b9caa9 (patch) | |
tree | 95e4d3c44d957e2c87d7a7e614d0692cce436edf | |
parent | a872f46ce1212703b8bed562c894ea1a932c0746 (diff) |
Dump the forest before the language model rescoring
-rw-r--r-- | decoder/decoder.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index 3394e0b8..69fbaf85 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -812,6 +812,9 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { abort(); } + if (conf.count("show_target_graph")) + HypergraphIO::WriteTarget(forest); + for (int pass = 0; pass < rescoring_passes.size(); ++pass) { const RescoringPass& rp = rescoring_passes[pass]; const vector<weight_t>& cur_weights = *rp.weight_vector; @@ -1018,8 +1021,6 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) { } if (conf.count("show_cfg_search_space")) HypergraphIO::WriteAsCFG(forest); - if (conf.count("show_target_graph")) - HypergraphIO::WriteTarget(forest); if (has_ref) { if (HG::Intersect(ref, &forest)) { // if (crf_uniform_empirical) { |