From 4a9dd1530c62a9d19d7491d6c2d1bd98bfd82574 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Fri, 5 Nov 2021 22:19:30 +0800 Subject: [PATCH] Remove duplicated token seq in rescoring. --- icefall/decode.py | 1 + 1 file changed, 1 insertion(+) diff --git a/icefall/decode.py b/icefall/decode.py index 619b3267a..42622fa70 100644 --- a/icefall/decode.py +++ b/icefall/decode.py @@ -224,6 +224,7 @@ class Nbest(object): else: word_seq = lattice.aux_labels.index(path) word_seq = word_seq.remove_axis(word_seq.num_axes - 2) + word_seq = word_seq.remove_values_leq(0) # Each utterance has `num_paths` paths but some of them transduces # to the same word sequence, so we need to remove repeated word