17The key idea behind this new approximation algorithm is to rewrite the n-gram posterior probability (Equation 16) as follows: where E X is the set of transitions of X, π x is the unique accepting path labeled by x in X and f (e, w, π) is a score assigned to transition e on path π containing n-gram w: f (e, w, π) =    1 if w ∈ e, p(e|X) > p(e ′ |X), and e ′ precedes e on π 0 otherwise.
(19) for each path π, we count the transition that contributes n-gram w and has the highest transition posterior probability relative to its predecessors on the path π; there is exactly one such transition on each lattice path π.