By contrast, unary rules indicate deletions, in that they make "progress" in r s without adding new words to w. We can compute the minimal-cost tree of G using the Viterbi algorithm.
to summarize, we can calculate s * from the intersection of a contextfree grammar G representing the REs to o u with the automaton F (r s ) representing the edit distance to r s .