mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-13 03:52:18 +00:00
Fix an error.
Nbest.fsa should always have token IDs as labels and word IDs as aux_labels.
This commit is contained in:
parent
9ddf23636e
commit
968e4a6609
@ -202,7 +202,8 @@ class Nbest(object):
|
|||||||
path_lattice, use_double_scores=use_double_scores
|
path_lattice, use_double_scores=use_double_scores
|
||||||
)
|
)
|
||||||
|
|
||||||
one_best = k2.remove_epsilon(one_best)
|
one_best = k2.invert(one_best)
|
||||||
|
# Now one_best has token IDs as labels and word IDs as aux_labels
|
||||||
|
|
||||||
return Nbest(fsa=one_best, shape=self.shape)
|
return Nbest(fsa=one_best, shape=self.shape)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user