Skip to content
Snippets Groups Projects
Commit 32b8cf1e authored by Yiming Wang's avatar Yiming Wang Committed by Daniel Povey
Browse files

[src] Fix bug in lattice-1best.cc RE removing insertion penalty (#2970)

parent 6b175711
No related branches found
No related tags found
No related merge requests found
......@@ -91,11 +91,11 @@ int main(int argc, char *argv[]) {
<< "(no output)";
n_err++;
} else {
fst::ScaleLattice(fst::LatticeScale(1.0 / lm_scale, 1.0/acoustic_scale),
&best_path);
if (word_ins_penalty > 0.0) {
AddWordInsPenToCompactLattice(word_ins_penalty, &clat);
AddWordInsPenToCompactLattice(-word_ins_penalty, &best_path);
}
fst::ScaleLattice(fst::LatticeScale(1.0 / lm_scale, 1.0/acoustic_scale),
&best_path);
compact_1best_writer.Write(key, best_path);
n_done++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment