Abstract
The accuracy of Optical Character Recognition (OCR) is crucial to the success of subsequent applications used in text analyzing pipeline. Recent models of OCR post-processing significantly improve the quality of OCR-generated text, but are still prone to suggest correction candidates from limited observations while insufficiently accounting for the characteristics of OCR errors. In this paper, we show how to enlarge candidate suggestion space by using external corpus and integrating OCR-specific features in a regression approach to correct OCR-generated errors. The evaluation results show that our model can correct 61.5% of the OCR-errors (considering the top 1 suggestion) and 71.5% of the OCR-errors (considering the top 3 suggestions), for cases where the theoretical correction upper-bound is 78%.
Introduction
Optical Character Recognition (OCR) serves as the foundational technology for digitizing historical archives. However, OCR output is frequently marred by errors, particularly in historical documents with non-standard fonts or technical terminology. Traditional post-processing methods often struggle with two primary issues: candidate limitation, where models only consider suggestions from the OCR engine itself, and feature sparsity, where models rely too heavily on n-gram frequencies without accounting for the visual nature of OCR-specific misreadings (e.g., "ri" appearing as "n").
This paper proposes a regression-based framework that expands the candidate search space and utilizes a diverse set of linguistic and structural features to improve correction accuracy.
Methodology
The proposed system employs a four-stage pipeline designed to detect and correct errors systematically.
- Error Detection: A "weak" filter flags words with low unigram frequency or those that do not appear in common n-gram contexts.
- Candidate Search: To overcome candidate limitations, the system searches a massive lexicon for all words within a Damerau-Levenshtein distance of 3 from the flagged error.
- Feature Scoring: Each candidate is evaluated based on:
- String Similarity: Measures visual resemblance using Levenshtein distance and Normalized Longest Common Subsequence (NLCS).
- Language Popularity: Frequency data from the Google Web 1T corpus.
- Lexicon Existence: Membership in specialized sets like Wikipedia entities.
- Context Popularity: Both exact and "relaxed" n-gram matching (allowing one wildcard in a 5-gram) to assess contextual fit.
- Candidate Ranking: The task is formulated as a regression problem using AdaBoost.R2 with decision trees to predict a confidence score for each candidate.
Experimental Setup
The model was evaluated using a ground-truth dataset of 2,728 OCR errors extracted from the 1907 book Birds of Great Britain and Ireland. This dataset provides a rigorous benchmark due to its historical typography and scientific nomenclature.
As shown in Table 1, the majority of errors have an edit distance of 1 or 2, though more complex mangling occurs. The "Sample Error" column illustrates typical OCR failures, such as character substitutions and insertions of punctuation.
Results and Discussion
The detection phase achieved a recall of 91.07%. In the correction phase, the model demonstrated strong performance across various error types.
As detailed in Table 2, the model achieved a 61.5% top-1 correction rate and a 71.5% top-3 correction rate. Notably, the performance on "Bounded" errors (single-word misreads) was significantly higher than on "Unbounded" errors (word splits or merges). Unbounded errors remain a challenge because they disrupt the standard n-gram context used for scoring.
The use of "Relaxed-context popularity" proved essential for handling sparse n-gram data in technical or rare sentences. Furthermore, the regression approach allowed for effective ranking of suggestions, which is highly beneficial for human-in-the-loop correction systems.
Conclusion
This research demonstrates that integrating external corpora with OCR-specific features in a regression framework significantly improves text correction. While the model captures the vast majority of its theoretical 78% upper bound (limited by the edit distance threshold), future work will focus on the "split/merge" problem, requiring more sophisticated tokenization to handle cases where OCR engines erroneously add or remove spaces.
Summary updated