The following algorithm summarizes the decoding process when not considering word reordering: Current node n, previous node n'; edge e Language model state L, L' Hypothesis h, h' Foreach node n in the lattice Foreach incoming edge e in n phrase = word sequence at e n' = FromNode(e) foreach L in n' foreach h with LMstate L LMcost = 0.0 foreach word w in phrase The updated hypothesis h' at the current node stores the pointer to the previous hypothesis and the edge (labeled with the target phrase) over which it was expanded.
at the final step, one can trace back to get the path associated with the minimum cost, i.e.