summaryrefslogtreecommitdiff
path: root/decoder/decoder.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2010-12-10 13:00:04 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2010-12-10 13:00:04 -0500
commitb8f314dddda3d440164e4772830e3c951ba06ee4 (patch)
tree794e70c9b2492181618c2226a199bd6f0b447feb /decoder/decoder.cc
parentd53b676548531af8f20a000b10d25f4fcaa811b3 (diff)
extract kbest alignments
Diffstat (limited to 'decoder/decoder.cc')
-rw-r--r--decoder/decoder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc
index fb219663..a21b47c0 100644
--- a/decoder/decoder.cc
+++ b/decoder/decoder.cc
@@ -870,7 +870,7 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) {
}
}
if (aligner_mode && !output_training_vector)
- AlignerTools::WriteAlignment(smeta.GetSourceLattice(), smeta.GetReference(), forest, &cout, 0 == conf.count("aligner_use_viterbi"));
+ AlignerTools::WriteAlignment(smeta.GetSourceLattice(), smeta.GetReference(), forest, &cout, 0 == conf.count("aligner_use_viterbi"), kbest ? conf["k_best"].as<int>() : 0);
if (write_gradient) {
const prob_t ref_z = InsideOutside<prob_t, EdgeProb, SparseVector<prob_t>, EdgeFeaturesAndProbWeightFunction>(forest, &ref_exp);
ref_exp /= ref_z;