1. A system for generating a block diagonal matrix from a lattice, the system comprising: (1) a processor; (2) a module configured to control the processor to compute posterior probability of all transitions T in a graph, if a lattice having transitions T is weighted; (3) a module configured to control the processor to extract a pivot baseline path from the lattice; and (4) a module configured to control the processor to align the transitions T in the lattice with the transitions in the pivot baseline path.