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 is
The 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]
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]
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.
Character segmentation 2026-11-05
Character segmentation separates an image of text into regions or hypotheses associated with individual characters. It is a specialized image segmentation problem within optical character recognition. The useful boundaries depend on the writing and imaging process: visible connected ink regions need not correspond one-to-one with characters.[ref]
For example, the dot and stem of a lowercase i can be disconnected regions belonging to one character. Two touching characters can instead form a single connected region. Connected-component labeling can locate connected regions, but counting those regions alone therefore cannot reliably count the characters.
A recognizer can compare alternative splits and merges. A degraded image of rn may admit one merged-region interpretation as m and a two-character interpretation as r followed by n. The choice depends on shape evidence, spacing and recognition context. Incorrectly committing to one region per character too early can make the correct word unavailable to later stages.
The historical Tesseract engine described by Ray Smith tests cuts when word recognition is unsatisfactory and can also associate broken pieces. Recognition thus supplies feedback about segmentation hypotheses, rather than merely accepting a fixed partition.[ref]
Character segmentation should be evaluated separately from simply matching the final text. A boundary error can cause several character edits, while a correct boundary can still receive the wrong label. Character error rate measures the resulting transcription disagreement; it does not by itself identify which stage caused it.
Connected-component labeling assigns an identifying number to each separate connected region of an image after choosing which pixels belong to the foreground and which neighboring pixels count as connected. In a binary image, interpret each foreground pixel as a vertex of a graph, with an edge for each allowed neighboring pair. Each component receives one label; background pixels receive a separate background value. The choice of pixel connectivity is part of the problem definition, not an incidental display setting.
For example, consider the binary image
If a foreground pixel connects only to foreground pixels immediately above, below, left or right, the two ones form two regions. One valid label image is . If diagonal neighbors also connect, the same input has one region, with label image . SciPy's ndimage.label treats zero as background and nonzero entries as foreground; its default two-dimensional neighborhood uses the four axial neighbors. Its neighborhood mask must be symmetric about its centre so that a connection works in both directions.[ref]
One direct algorithm scans for an unlabelled foreground pixel, starts a flood fill there and assigns a fresh label to every reachable foreground pixel. It then resumes scanning for another unlabelled region. For a fixed-size neighborhood, every pixel and a bounded number of neighbors need be inspected, giving time complexity for image pixels, with storage for labels and the pending search. Another approach records provisional labels and merges equivalent ones using a disjoint-set data structure.
The numerical labels are identifiers: swapping labels and does not change the segmentation. A single printed character can have several disconnected regions, while touching characters can share one region. Connected-component labeling therefore supplies geometric grouping for image segmentation and optical character recognition; it does not itself determine what an object means.
Culturomics 2026-11-05
Culturomics investigates historical patterns through large-scale quantitative analysis of recorded language, especially digitized books. A text corpus turns occurrences of words or n-grams into measurable time series. Jean-Baptiste Michel and collaborators demonstrated the approach with a corpus of 5,195,769 books, selecting material partly by the quality of optical character recognition and publication metadata.[ref]
For an original example, 500 occurrences in ten million word tokens give . A later collection with 800 occurrences in twenty million tokens gives : the count rose, but the normalized rate fell. A changing name can also change the measured series without an equivalent change in its referent. Culturomics therefore connects computational counting to hypotheses about language change, while requiring checks on publication selection, transcription errors and changing terminology.
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]
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 is
The edit distance makes the scoring rule explicit; one visual mistake need not count as one character edit.[ref]
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.
Ray Smith is a researcher and developer associated with optical character recognition and the Tesseract engine. His official author profile records development of Tesseract at HP Labs Bristol and later work on it at Google. These are documented contributions, rather than an identification with other people sharing the name.[ref]
His 2007 paper An Overview of the Tesseract OCR Engine by Ray Smith explains an architecture that first organizes a page into text lines and words, then performs recognition in two passes. Confident first-pass results train an adaptive classifier; a later pass revisits difficult words using what the system has learned about that document. The paper also discusses character segmentation and recognition features.[ref]
A useful example is a page printed in one unusual font. Recognizing several clear characters can provide evidence about that page's letter shapes, helping interpret an ambiguous character elsewhere. Adaptation improves specificity but also makes the reliability of its training examples important. This explains a documented design idea; the 2007 architecture should not be assumed to describe every later Tesseract release.
Figure 1.
Ray Smith, the OCR researcher, identified on his Google Research author profile
. External portrait linked by Ray Smith profile by Google Research.
Tesseract (software) 2026-11-05
Tesseract is an open-source engine for optical character recognition. It combines image analysis with trained recognition data to extract text from images. Its documentation describes a command-line interface and a programming interface, with recognition data for different writing systems. A language choice affects the model used; it does not translate the recognized text.[ref]
For example, the documented command tesseract scan.png result -l eng reads an image, selects English recognition data and writes text to result.txt. The output basename is result, so the filename extension is supplied by the selected output format. Adding pdf requests a PDF containing the page image and a searchable text layer. If recognition confuses a letter in the image, searching that text layer can still miss the intended word.[ref]
The architecture has changed over its history. Ray Smith's 2007 paper describes an engine that groups connected image outlines into lines and words, then recognizes them in successive passes. Version 4 introduced recognition based on long short-term memory neural networks; the 5.x manual documents this engine alongside the legacy option.[ref][ref]
A useful test compares output with a checked transcription using character error rate, while also inspecting omitted regions and reading order. Recognition accuracy depends on image quality, layout and matching language data. Installing the engine alone does not establish the accuracy of a particular scanned collection.