Skip to Main Content
The binary n-gram and Viterbi algorithms have been suggested as alternative approaches to contextual postprocessing for text produced by a noisy channel such as an optical character recognizer. This correspondence describes the underlying theory of each approach in unified terminology, and presents new implementation algorithms for each approach. In particular, a storage efficient data structure is proposed for the binary n-gram algorithm and a recursive formulation is given for the Viterbi algorithm. Results of extensive experiments with each algorithm are described.