diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2012-02-12 16:46:46 -0500 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2012-02-12 16:46:46 -0500 |
commit | feab7be095f6454f9ce3021190939ca64bf41e62 (patch) | |
tree | ea665f86d7d798b19951e4f0a84af4e22cc98ed1 /decoder/decoder.cc | |
parent | 51ddc7d2f2086908ea8a194a68225e0289f930d5 (diff) |
Target-side only output format
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r-- | decoder/decoder.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc index 3b53fd6b..3394e0b8 100644 --- a/decoder/decoder.cc +++ b/decoder/decoder.cc @@ -408,6 +408,7 @@ DecoderImpl::DecoderImpl(po::variables_map& conf, int argc, char** argv, istream ("show_partition,z", "Compute and show the partition (inside score)") ("show_conditional_prob", "Output the conditional log prob to STDOUT instead of a translation") ("show_cfg_search_space", "Show the search space as a CFG") + ("show_target_graph", "Output the target hypergraph") ("coarse_to_fine_beam_prune", po::value<double>(), "Prune paths from coarse parse forest before fine parse, keeping paths within exp(alpha>=0)") ("ctf_beam_widen", po::value<double>()->default_value(2.0), "Expand coarse pass beam by this factor if no fine parse is found") ("ctf_num_widenings", po::value<int>()->default_value(2), "Widen coarse beam this many times before backing off to full parse") @@ -1017,6 +1018,8 @@ 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) { |