Developer guide for Tesseract TSV output

Confidence is a review signal, not an accuracy score.

Tesseract TSV confidence can locate risky words and pages after you have run Tesseract. It cannot prove that the output is correct, that reading order survived, or that table cells and form fields stayed attached.

Not a DocUnlocked pre-test.This guide helps developers audit Tesseract output already created elsewhere.
Have a PDF or image? Use the free source-file check

What the TSV confidence column measures

Tesseract can produce TSV with hierarchy, bounding boxes, confidence and recognized text. The confidence value belongs to the engine's recognition decision. Higher values generally indicate that the selected word looked more plausible to that engine under that model and segmentation.

It is not the percentage of characters that are correct. A word with confidence 92 can still be wrong. A page with a high mean can still have reordered columns, detached form labels or a table whose cells no longer align.

level  page_num  block_num  par_num  line_num  word_num  left  top  width  height  conf  text

Why many TSV rows have confidence -1

TSV includes rows for the page, block, paragraph, line and word hierarchy. Structural rows commonly carry `-1` because they are not recognized word tokens. For word-confidence statistics, filter to non-empty text rows with confidence greater than or equal to zero.

const words = rows.filter(row =>
  row.text.trim() && Number(row.conf) >= 0
);

Averaging every TSV row, including `-1`, creates a meaningless result. The free analyzer applies the word-row filter before calculating any metric.

Use thresholds as review queues

There is no universal confidence threshold that guarantees correctness. Language model, image quality, font, handwriting, page segmentation and document type all change the distribution. Use thresholds to decide what receives human attention, then calibrate them against labeled samples from your own workflow.

SignalPractical actionWhat it does not prove
Below 50Prioritize the word and surrounding line for source comparison.That every word above 50 is correct.
50 to 79Review consequential names, dates, amounts and identifiers.That ordinary prose is structurally complete.
80 and aboveUse as a lower-risk queue only after workflow calibration.Correct tables, checkbox state or reading order.
High page meanCompare with low-word share and page layout.That no critical local error exists.

Page segmentation changes the confidence distribution

The public benchmark runs the same four sources under PSM 6 and PSM 11. On the NIST handwriting form, PSM 6 returns 67 recognized words with 45.81 mean confidence. PSM 11 returns 218 words with 65.15 mean confidence. The second profile sees more printed labels and isolated number rows; the first emphasizes the handwritten passage.

Neither result reconstructs the form as reliable fields. The higher mean therefore describes a different extraction, not a proven improvement in document accuracy.

1930 Census
92.4%
Bell notebook
87.4%
NIST SD19
55.2%
IRS W-4
7.1%

Five confidence-analysis mistakes

1. Treating confidence as probability

Do not report mean confidence 90 as “90% accurate.” Accuracy requires ground truth and an explicit metric such as character error rate or word error rate.

2. Averaging structural -1 rows

Filter to recognized words before calculating mean, median or threshold shares.

3. Looking only at the mean

A few very weak names or amounts can matter more than hundreds of clean boilerplate words. Inspect the lowest-confidence tokens and the share below your review threshold.

4. Ignoring page segmentation mode

Different PSM choices can produce different token sets, order and confidence distributions from the same image.

5. Ignoring structure

Confidence is attached to recognized text. It does not independently validate row identity, column attachment, checkbox state, reading order or field semantics.

A defensible production review policy

  1. Preserve provenance: keep page, line and bounding-box references with every word.
  2. Flag local risk: queue low-confidence words and consequential entities.
  3. Measure distribution: report median and threshold shares, not mean alone.
  4. Check structure: validate tables, fields and reading order separately.
  5. Calibrate on ground truth: choose thresholds from representative labeled documents.
  6. Keep human review: require source comparison for legal, financial or final decisions.

Sources and reproducible evidence

Use the official command-line documentation for TSV and page segmentation usage, and the official quality guide for image and segmentation factors. The DocUnlocked benchmark publishes its raw outputs and calculations.

Apply the guide

Turn a TSV into a review queue.