New Tool Radar

AI PDF

How to Use OCR Confidence Scores to Target Proofreading

Sort Tesseract's word-confidence scores lowest first, proofread the doubtful words against the scan, and never let a high score approve a number.

Schematic illustration of Tesseract TSV output: eleven words with confidence scores, the lowest three listed first for proofreading.

OCR engines score their own guesses. Tesseract’s TSV output carries one row per word with a conf column scored 0 to 100, and the documentation’s own worked example shows the word “$43,456.78” scoring 93.263031 while the misread word “preguigoso.” scores 92 in the matching hOCR output. The correct amount scores barely higher than the wrong word. That is the whole lesson of this guide: a confidence score tells you where to look first, not what is true.

The numbers in this guide are Tesseract’s own documentation example, from its Command Line Usage page — not the result of a run made for this guide. They are used here to show how to read the scores, not as a benchmark.

Use the practice file

Tesseract’s documented example image and its TSV output, eurotext.tsv, as published on the Tesseract Command Line Usage page. The first two lines of words and their scores are:

Word Confidence
The 96.063751
(quick) 95.965691
[brown] 95.835831
{fox} 94.899742
jumps! 96.683357
Over 96.912064
the 96.887390
$43,456.78 93.263031
<lazy> 90.893219
#90 96.820717
dog 96.538940

Eleven words, scores from 90.893219 to 96.912064. The lowest three are “<lazy>” at 90.89, “$43,456.78” at 93.26 and “{fox}” at 94.90. The amount is correct in the documentation’s output — and it is still the second-lowest score on the page.

Use the scores to target proofreading

Expected result. We checked the Tesseract Command Line Usage page and the Tesseract manual page. We did not run Tesseract. The checks below are what to expect if the review is done correctly; work through them on the practice file.

1. Get the TSV output

Run Tesseract with tsv as the output format, for example tesseract page.png out -l eng tsv. The documentation says to add tsv at the end of the command to get the TSV output.

Expected result: a .tsv file with the columns level, page_num, block_num, par_num, line_num, word_num, left, top, width, height, conf and text.

2. Keep only the word rows

Filter the TSV to level 5 rows only.

Expected result: the 11 word rows above remain. Rows at levels 1 to 4 describe the page, block, paragraph and line; they carry a conf of -1 and no text, and they are structure, not words.

3. Sort the words lowest score first

Sort the word rows by the conf column, ascending.

Expected result: the first three rows are “<lazy>” (90.893219), “$43,456.78” (93.263031) and “{fox}” (94.899742). These are the words to check first.

4. Proofread the lowest three against the scan

Open the page image and read the three lowest-scoring words on it.

Expected result: all three match the image — “<lazy>”, “$43,456.78” and “{fox}” are all correct. Low confidence meant “look here”, not “wrong”. The amount is the proof: a correct figure can sit near the bottom of the list.

5. Remember what a high score does not prove

In the same documentation example, the hOCR output gives the misread word “preguigoso.” a confidence of 92 — close to the correct amount’s 93.26.

Expected result: the rule is set down in writing — no score, high or low, approves a number, a date or a name on its own. Those fields are checked against the scan by a person, whatever they scored.

Verdict table

Check Expected result Pass?
TSV output 12 columns, conf per word —
Word rows only 11 level-5 rows; conf -1 rows set aside —
Lowest first <lazy> 90.89, $43,456.78 93.26, {fox} 94.90 —
Proofread lowest three All three correct against the image —
High-score rule No score alone approves a number or name —

Related guides: Spot OCR errors in a scanned PDF before you trust the numbers — Check if a PDF needs OCR.

Limits

  • The documentation does not describe conf as the probability that a word is correct. Treat it as a signal for where to look first, not as a measurement of truth.
  • Confidence scores differ between engines and output formats — the TSV example prints six decimal places while the hOCR example prints whole numbers for the same words. Do not compare scores across tools as if they meant the same thing.
  • UNTESTED — Tesseract was not run; the scores above are Tesseract’s published documentation example, used to show how to read them. The practice file is the documentation example.

Sources

See all