mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-27 18:54:18 +00:00
Remove duplicated token seq in rescoring.
This commit is contained in:
parent
810b193dcc
commit
4a9dd1530c
@ -224,6 +224,7 @@ class Nbest(object):
|
|||||||
else:
|
else:
|
||||||
word_seq = lattice.aux_labels.index(path)
|
word_seq = lattice.aux_labels.index(path)
|
||||||
word_seq = word_seq.remove_axis(word_seq.num_axes - 2)
|
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
|
# Each utterance has `num_paths` paths but some of them transduces
|
||||||
# to the same word sequence, so we need to remove repeated word
|
# to the same word sequence, so we need to remove repeated word
|
||||||
|
Loading…
x
Reference in New Issue
Block a user