Character error rate 2026-11-05
The character error rate measures disagreement between recognized text and a reference transcription using edit distance. With unit-cost insertions , deletions and substitutions in a minimum-cost alignment, and reference characters, the reference-length convention isThe alignment matters: counting mismatched positions without allowing edits can exaggerate the effect of one omitted character. This convention is used to evaluate optical character recognition against a specified transcription.[ref]
Quality Assurance in OCR-D by OCR-D. Evaluation Metrics, Levenshtein Distance and Character Error Rate: reference-length formula and edit operations
For reference
cat and recognized cut, one substitution gives . For reference a and recognized aaaa, three insertions give , or . The second result is valid: under this denominator, character error rate is not bounded by one. Clipping the result or using the longer string as denominator defines a different metric.[ref]Quality Assurance in OCR-D by OCR-D. Character Error Rate, discussion of rates beyond 100% and alternative normalizations
Aggregation also changes the question. Suppose one one-character sample has one error and a hundred-character sample has none. The unweighted mean of their two rates is , while pooling edits and reference lengths gives . Reporting the aggregation rule prevents a short, difficult sample from being confused with a large fraction of the complete text.
The definition of character must be fixed too. Unicode code points and user-perceived grapheme clusters can give different lengths; Unicode normalization, spaces and punctuation can change both the alignment and its denominator. An empty reference needs an explicit convention because the displayed formula divides by zero. A score is meaningful only together with these evaluation choices.
Optical character recognition 2026-11-05
Optical character recognition converts pictures of written or printed text into encoded text. The input is an image of marks; the output is a sequence of characters that can be searched, copied or processed as text. Merely storing a scanned page as a raster image does not perform this recognition.
A typical system must locate text regions and lines, separate or jointly interpret their marks, and decide which character sequence they represent. Image processing can correct skew or improve contrast; image segmentation can identify regions and candidate boundaries. Recognition can use visual evidence together with constraints from surrounding text. These stages can fail separately: a correct symbol classifier cannot read a line that the layout analysis omitted.[ref]
An Overview of the Tesseract OCR Engine by Ray Smith. §2, printed p. 629, architecture: binary input, connected components and organization into lines and words; §§3–5, line finding and word recognition
For a concrete ambiguity, the final
rn of modern can resemble m in a degraded scan, producing modem. That single visual merge requires two ordinary character edits to repair: substitute the final m with r, then insert n. With six reference characters, the character error rate in this synthetic example isThe edit distance makes the scoring rule explicit; one visual mistake need not count as one character edit.[ref]Quality Assurance in OCR-D by OCR-D. Evaluation Metrics, Levenshtein Distance and Character Error Rate sections
A historical implementation illustrates the engineering choices: the 2007 description of Tesseract starts from a binary image and organizes connected outlines into text lines and words before recognition passes. That is evidence about a particular engine architecture, not a requirement that every recognizer use separate character segmentation. Accuracy depends on the images, writing system, layout and evaluation convention; fluent-looking output can still contain consequential transcription errors.