AI Optical Character Recognition: When One Letter Hides a Record

Compare a census image with its machine-readable text, measure a real character error, and see how AI models handle print and handwriting.

A magnifier enlarges a printed lowercase letter on a type specimen.
A recognizer must choose a character from a pattern of ink. A reader can check that choice against the original shape.

The 1880 census of De Smet has a plainly printed word in its heading: Inhabitants. The National Archives PDF contains a searchable text layer that starts the word with a lowercase l. We ran an AI model trained to recognize English text on the same strip of ink. It recovered the printed word and misread the handwritten town beside it. Those two outcomes capture the promise and the difficulty of using AI to open an archive to search.

Two machine readings, one original image

The printed heading reads Schedule 1, Inhabitants in, followed by De Smet in cursive.
The original 1880 census heading from the National Archives, cropped by Yenra. The change from printed type to cursive occurs in the middle of the line.

We extracted the embedded text from the source PDF before running fresh recognition. The original layer reads lnhabitants, starting with lowercase L. The image reads Inhabitants, starting with capital I. A literal search for the correctly spelled word misses that embedded string. A search engine that tolerates spelling differences might still retrieve it. Inspect the original PDF with its text layer.

For the second reading we used Tesseract through PyMuPDF with the English tessdata_fast language model. The input was the 799-by-102-pixel heading crop from the source image, supplied before JPEG compression. The new output correctly included Inhabitants in. For the handwritten De Smet, the output was Me Level. The same recognizer also turned the printed schedule number into a vertical bar. Correcting the town requires looking at the cursive and the archival description. Tesseract’s model files · National Archives place and collection notes.

How the model gets from ink to a string

Optical character recognition turns marks in an image into text that a computer can search or read aloud. Modern Tesseract supports a neural network that reads a line as a sequence. It uses patterns across neighboring shapes to choose likely characters. Before that can work, the system has to find the text and put it in reading order. A misplaced line break between a name and an age can spoil a record even when every character is right. Tesseract’s recognition documentation.

A reader holds a tablet displaying a densely written page.
Printed instructions and cursive entries share a page but can produce very different recognition errors.

Try the original page, a single line and a version with corrected skew. Compare all three against the same manual transcription. A cropped line can exclude a neighboring flourish, but it can also clip the top of a capital. If a print recognizer struggles with cursive, a handwriting model trained on comparable scripts and periods is a better candidate to test. Tesseract’s developers document how image quality, borders and segmentation affect results. Tesseract’s image preparation and segmentation guidance.

Test the handwriting someone actually needs to find

For the 1950 U.S. census, the National Archives used machine recognition to build an initial name index and invited readers to add corrections. Its guidance names problems familiar from De Smet, including faint pages, orientation and handwriting crossing the line above or below. Browsing by enumeration district gives a researcher a second way in when a name query fails. This was a separate 1950 indexing project. Our two readings above come from the 1880 page. National Archives on the 1950 name index and search alternatives.

A laptop stands beside a printed sheet on a library table.
The image settles disagreements between a plausible spelling and the marks actually on the page.

To evaluate a recognizer for family history, transcribe a held-out set of pages by hand. Include difficult handwriting, repeated-surname marks and unusual names. Score the printed headings and handwritten names separately. Then try retrieving the known people from the index. A system can transcribe thousands of common printed words correctly while still hiding the few surnames that brought readers to the collection.

Publish text that leads back to its evidence

Store the first machine reading, the checked reading and the page location together. An index can offer alternate spellings while the transcription preserves what the writer put down. If a surname is carried forward by a dash, record that editorial expansion. A future reader should be able to see the dash and decide whether it belongs to the same household.

A diagram of linked document systems branches around a central figure.
Carry the page and line coordinates through indexing so that a search result can open at the relevant entry.

The Library of Congress maintains ALTO, a format that can associate recognized text with positions on the source page. Such coordinates let an interface highlight the line someone searched for. The layout test on the full census sheet shows how those regions can go wrong upstream. The Ingalls–Wilder comparison shows what the researcher still has to establish after finding a name. Library of Congress ALTO standard.

Illustrated field notes

Language, immediate results and access controls
A world map and blocks of text appear on a desktop monitor.
Choose a recognition model for the script and language on the page, and test names that fall outside its common vocabulary.
A reader uses a public terminal in a bright room.
Immediate recognition can give a reader an early result. Mark whether anyone has checked it against the source.
An operator at a monitor examines a blue-toned interface.
When material has access restrictions, the searchable text and its snippets need the same review as the image.
Cleanup, retraining and accessible reading order
Two monitors show text and tabular material in a sunlit office.
Compare recognition on a working copy before and after cleanup. Keep changes that improve readings on held-out pages.
Glowing orange and blue lines wind around a dark surface.
Evaluate a retrained recognizer on pages from scribes and volumes it did not see during training.
A laptop appears in a diagram connected to several document screens.
A corrected name belongs in the searchable index with a pointer back to the exact source entry.
A tablet rests on a table under warm lamplight.
For someone listening to the text, the order of headings and rows matters as much as individual letters.