pub fn collapse(columns: &[usize]) -> Vec<usize>Expand description
The CTC collapsing rule applied to a sequence of columns: runs of the same symbol become one, then the blanks go.
Column 0 is the blank. ctc_topo encodes this same rule; here it is
written out directly, which is useful for checking an answer and for a caller
who has a greedy argmax rather than a lattice.