Skip to content

Annotation quality guide

Document OCR Layout and Coordinate Review: Connect Words to the Right Page Region

Review OCR text, page geometry, reading order, and confidence evidence as separate layers before treating a document export as usable.

OCR output is more than a string. A document review should connect text spans to a page, layout region, coordinate system, and processing record while keeping uncertain words visible. Compare page dimensions, boxes, reading order, and source references before rewriting text. This guide is a static worksheet, not an OCR engine, parser, accessibility certification, or claim that a document is accurate.

Updated

On this page

Define the page and text contract first

The source dates shown in this guide identify documentation checks on 22 October 2026, not original publication dates. Follow each citation for the document format vocabulary being discussed. Record a controlled document id, page id, source image dimensions, orientation, resolution if available, OCR engine or workflow version, and output format. Keep source images and raw OCR outside a public worksheet unless the owner has approved the handling boundary.

Define the page and text contract first (table)
LayerSynthetic fieldQuestion to resolve
Document identitysynthetic-doc-04Is this the source image or a derivative?
Page geometrywidth 1200, height 1600Which coordinate units and origin apply?
Text unitword, line, block, or regionWhat does one record represent?
Positionleft, top, width, heightDoes the box map to the same page?
Orderblock 2 then block 1Is reading order explicit or inferred?
Confidencesynthetic score, scale unknownWhat produced the score and scale?
Processingworkflow-3, checked dateWhich activity generated this output?

The Library of Congress, (opens in a new tab) describes layout and content for physical text resources. The Tesseract OCR, (opens in a new tab) documentation names output fields that can expose page, block, line, word, coordinates, confidence, and text. Treat those fields as observations from a particular workflow, not universal semantics for every OCR export.

Reconcile coordinates, boxes, and reading order

Coordinate review starts with page width, height, origin, units, rotation, and crop. Compare a word box to its parent line, block, and page. A box that fits page bounds can still point to the wrong page version or be misplaced after rotation. Record raw coordinates and derived checks separately.

Synthetic OCR row fixture

Reconcile coordinates, boxes, and reading order code example, JSON
{
  "document_id": "synthetic-doc-04",
  "page": {"id": "p1", "width": 1200, "height": 1600, "origin": "top-left"},
  "rows": [
    {"level": "word", "id": "w1", "text": "alpha", "left": 80, "top": 120, "width": 90, "height": 30, "order": 1, "confidence": "synthetic"},
    {"level": "word", "id": "w2", "text": "beta", "left": 185, "top": 120, "width": 72, "height": 30, "order": 2, "confidence": "synthetic"}
  ],
  "review": {"page_link": "matched", "bounds": "inside", "reading_order": "conditional"}
}

The text in this fixture is synthetic. A real report should avoid private source text and use stable row identifiers, aggregate counts, or owner-approved redactions. If page rotation or image preprocessing occurred, include that activity in the transform record rather than treating coordinates as timeless.

Reconcile coordinates, boxes, and reading order (table)
FindingEvidence statementDisposition
Box outside pageCoordinates exceed the recorded page geometryHold page or transform link
Text and box disagreeText row is linked to a different regionRetain both records and investigate
Order not statedCoordinates exist but sequence is absentMark reading order unknown
Confidence scale absentA score is present without scale or policyReport value as uncalibrated evidence
Page ids differOCR and image references do not reconcileHold artifact identity

Separate text fidelity from layout evidence

A text match can be correct while a coordinate is wrong; a coordinate can align while a character is misread. Keep word, line, block, and page findings separate. Record an edit or normalization as a new derived text entity with the reason and source row references. Do not silently replace the OCR output.

Separate text fidelity from layout evidence (table)
CheckRecordDo not infer
Character findingSource row id and normalized observationThat surrounding words are correct
Word boundaryToken span and neighboring boxesThat punctuation was preserved
Line groupingParent line and order evidenceThat reading order is natural
Region typeHeader, body, table, or unknownThat a layout label is semantic truth
ConfidenceValue, scale, and producing workflowThat confidence is calibrated
CorrectionNew text version and reasonThat edited text is source text
  1. Check page identity and geometry before interpreting word rows.
  2. Compare parent-child boxes and order using synthetic fixtures.
  3. Classify text, layout, and confidence findings separately.
  4. Keep corrections linked to source rows and workflow versions.
  5. Publish only controlled excerpts or aggregate diagnostics.

Use a worksheet for layout failures and unknowns

Use one row per page or region in the review ledger. Include source references for page images, OCR output, preprocessing activity, and any correction. Keep unknown values explicit so an absent confidence scale is not mistaken for a failed confidence check.

Use a worksheet for layout failures and unknowns (table)
Review fieldExample stateNext question
Page identitymatched / mismatch / unknownWhich image version is authoritative?
Dimensionsmatched / transformed / unknownWhat operation changed geometry?
Coordinatesinside / outside / not suppliedDo boxes use the stated units?
Hierarchyword to line to blockAre parent relationships supported?
Reading orderexplicit / inferred / unknownWho owns a disputed order?
Text correctionnone / derived versionWhat source row supports the edit?
Confidencevalue with scale / unavailableCan it be compared at all?
Dispositionconditional / hold / unresolvedWhat evidence is still required?

Keep OCR evidence scoped and qualified

ALTO and Tesseract documentation describe output structures and fields, not the correctness or authority of a particular document. This review can show which page, region, coordinate, text version, and processing record were supplied. It cannot establish that text is accurate, complete, accessible, private, authorized, or suitable for a downstream use.

Pair this guide with the data provenance log for processing history and annotation label ontology versioning when layout labels have versioned meanings. After supported non-health scope, authority to describe the collection, and a controlled OCR packet are established, the qualified appraisal request path may be a next preparation step. It does not run OCR, correct text, create a quote, match a buyer, issue a legal opinion, or grant a license.

Takeaways

  • Record document and page identity, dimensions, coordinate convention, hierarchy, order, confidence, and processing activity.
  • Keep text, layout, and confidence findings separate.
  • Retain source OCR and represent corrections as linked derived records.
  • Use synthetic rows to test page, box, order, and transform reconciliation.
  • Treat format fields as evidence, not a universal accuracy or rights conclusion.

Sources

  1. Library of Congress: ALTO XML Schema (opens in a new tab)
  2. Tesseract OCR: Command Line Usage (opens in a new tab)

Use the appraisal path after the OCR packet is organized.

It does not run OCR, correct text, create a quote, match a buyer, or grant a license.