Contents
  1. Purpose and development
    1. What document understanding preserves
    2. Must-know turning points
  2. Inputs and representation
    1. Inspect the available content
    2. Retain document relationships
  3. Text and page structure
    1. Prepare images and preserve coordinates
      1. Coordinate mappings
    2. Recognize character sequences
      1. Alignment without character boxes
    3. Find regions and their roles
    4. Recover reading order and continuity
  4. Traceability
    1. Locate supporting source material
      1. Alignment through transformations
  5. Document architectures
    1. Combine text, layout and images
    2. Generate structure from page images
  6. Tables and records
    1. Recover table meaning
      1. Meaning outside the cell
    2. Extract fields with context
      1. Literal and interpreted values
    3. Check records against their sources
  7. Quality and recovery
    1. Measure the required fidelity
      1. Transcription
      2. Beyond recognized strings
      3. Whole-document readiness
    2. Choose what to accept
    3. Recover incomplete and disputed results
      1. Review and correction
  8. Downstream use
    1. Deliver context with the records
  9. Check understanding
  10. Open questions
  11. Selected talks
  12. References
  13. Talk library
← All topics

Document Understanding and OCR

Document understanding makes information written for people usable by software. The challenge extends beyond reading characters: columns establish sequence, headers give numbers meaning, and notes qualify nearby claims. A useful system preserves those relationships while producing searchable text or structured records—and keeps enough connection to the original document to inspect and correct its work.

Purpose and development

What document understanding preserves

Optical character recognition, or OCR, recovers written characters from images. It can make a scanned page searchable by adding recognized text behind the visible image. Document understanding recovers the organization needed to interpret that content: paragraphs, tables, headings and relationships. Field extraction then selects information for a particular task, such as an invoice number or delivery date.

Field extraction must recover the relationship that makes a value answer the request. An invoice can show a total, a deposit and a remaining balance. Recognizing each amount correctly does not tell the system which one to return; it must associate the amount with the relevant label and context. A valid numeric field can therefore contain the wrong amount.

The invoice total is 220 USD, but a 50 USD deposit leaves 170 USD due. Extracting the balance requires identifying the field’s role, not just recognizing a number.

Source fidelity means agreement with the document, including its qualifications and omissions. It does not establish that the document's assertions are true. Provenance records where information originated and how it was derived. Together, these ideas determine the system's job: recover the required information, preserve its meaning, and make its origin inspectable.

Must-know turning points

Document recognition developed around changing assumptions about the input. Early systems constrained printing; later recognizers accommodated varied typefaces and imperfect scans. Digital formats created a parallel opportunity to recover encoded content directly. Learned document models added methods for interpreting relationships across a page. These approaches continue to serve different inputs and tasks.

Changing inputs, expanding document understanding

  1. 1956Farrington character readerFarrington commercially sold a reader that recognized printed numbers on tabulating cards and punched the information into those cards.Sources & context

    Contributors: Farrington; the Smithsonian traces the earlier reader to David Shepard and Harvey Cook.

    What changed: Connected human-readable credit-sales records to punched-card processing, though the machine did not sell widely.

  2. 1960sOCR-A & OCR-BOCR-A and OCR-B were developed as fonts for optical recognition, constraining the character shapes presented to readers.Sources & context

    Contributors: OCR-A and OCR-B development efforts in the United States and Europe.

    What changed: Made the printed input part of the recognition design; subsequent standards specified character shapes and printing tolerances.

  3. January 1976Kurzweil Reading MachineThe announced reading machine combined a flatbed scanner, omnifont recognition and speech synthesis.Sources & context

    Contributors: Ray Kurzweil and the Kurzweil Computer Products team.

    What changed: Enabled blind readers to hear ordinary printed material without requiring one specialized typeface.

  4. 1984–1994 development; 2005 open-source releaseTesseractHP developed Tesseract for scanner applications. Its historical engine grouped components into lines and words, then used successful first-pass words to adapt recognition of uncertain cases.Sources & context

    Contributors: HP's Tesseract team, described by Ray Smith.

    What changed: Addressed imperfect print through segmentation and adaptation; the later release made the engine available as open source.

  5. 1991Camelot → PDFWarnock's Camelot proposal addressed document interchange across systems where application files and fonts did not transfer reliably.Sources & context

    Contributors: John Warnock; Peter Hibbard and Richard Cohen are identified as architects of the resulting PDF format.

    What changed: Established a parallel document path built around explicit pages and packaged content, rather than recognition from scans.

  6. 2006 CTC; 2013 printed OCR applicationCTC → LSTM OCRCTC learned label sequences without a manually aligned label at every input position. Its original experiment used speech; Breuel and colleagues later applied it to normalized printed text lines.Sources & context

    Contributors: Alex Graves, Santiago Fernández, Faustino Gomez and Jürgen Schmidhuber; Breuel and colleagues for printed OCR.

    What changed: Reduced reliance on character-segmented training data while retaining the need for suitable line inputs and normalization.

  7. 2015CRNNCRNN joined convolutional image features, bidirectional recurrent processing and CTC transcription in one trainable recognizer.Sources & context

    Contributors: Baoguang Shi, Xiang Bai and Cong Yao.

    What changed: Enabled transcription of cropped scene words without individual character boxes; locating suitable recognition regions remained a separate requirement.

  8. KDD 2020 publicationLayoutLMLayoutLM pretrained representations using recognized text and two-dimensional layout, with separately obtained image features added for downstream tasks.Sources & context

    Contributors: Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei and Ming Zhou.

    What changed: Made page relationships available beyond a plain word sequence. Its form results evaluated semantic labeling, not entity linking.

  9. 2021 publicationLayoutLMv2LayoutLMv2 combined image features, recognized text and layout during pretraining, adding spatial relationships and text-image alignment and matching objectives.Sources & context

    Contributors: Yang Xu and colleagues.

    What changed: Connected text and imagery during representation learning while continuing to consume upstream OCR.

  10. November 2021 preprint; ECCV 2022 publicationDonutDonut encoded document images and generated token sequences that could be converted into structured information without an external OCR result.Sources & context

    Contributors: Geewook Kim and the NAVER team.

    What changed: Removed a separate OCR dependency while still learning to read. Resolution and selecting the correct visible value remained consequential.

  11. September 17, 2025Granite-DoclingGranite-Docling-258M was released with instructions for page, region and table conversion, generating DocTags for conversion into DoclingDocument.Sources & context

    Contributors: IBM.

    What changed: Consolidated several specialized conversion functions within a model component while retaining a surrounding library for document handling and exports.

Follow the progression from constrained print to varied typefaces, sequence recognition and learned document structure. Portable digital documents develop alongside image recognition; these approaches coexist. Milestone spacing is not to scale.

Inputs and representation

Inspect the available content

A born-digital document contains content encoded by its authoring software. A scan records page appearance as an image. A mixed document contains both, potentially on the same page. A PDF may also contain a hidden OCR layer. Inspect pages and regions before choosing an extraction path: usable encoded text can be retained while additional image text is recognized.

Visible text does not prove that native extraction works. A glyph is a font's visible character shape; its mapping to Unicode text is a separate operation. A PDF can display correctly yet copy or search incorrectly when those mappings disagree. Compare extracted text with rendered appearance, especially identifiers and amounts. Existing text should be treated as an available representation to inspect, rather than automatic proof that recognition is unnecessary.

Route by available content

Example

One page may need native extraction, recognition or both.

Inspect text and appearance at page or region level. Preserve unresolved disagreements before replacing existing content.
Read the diagram as text
  • Inspect page or region. Compare encoded content with rendered appearance.
  • Extract native content.
  • Recognize image text.
  • Combine native text and OCR. Retain their source locations.
  • Resolve input disagreement. Inspect conflicting or unreadable representations.
  • Inspect page or regionExtract native content: Usable native content covers target.
  • Inspect page or regionRecognize image text: Target text available only as image.
  • Inspect page or regionCombine native text and OCR: Native content plus image text.
  • Inspect page or regionResolve input disagreement: Representations disagree or are unreadable.

Office documents can expose more native structure. WordprocessingML directly encodes paragraphs and text runs, where a run groups text with shared formatting properties. Headers, footnotes and comments can occupy separate package parts. Extracting only the main body can therefore omit material even when no OCR is needed. Native structure saves inference work only when the relevant parts are actually read.

Reprocessing also changes information. OCRmyPDF distinguishes skipping existing text, replacing recognized text and rasterizing everything; replacement can invalidate structural tags. Its release notes document a defect that stacked duplicate OCR layers. Preserve the input snapshot, record the page inventory, and distinguish unsupported or unreadable pages from successful extraction. Source provenance explains the broader retention and identity decisions.

Retain document relationships

Before exporting strings or records, retain an intermediate document representation: identified content items connected by explicit relationships. A page contains regions; a paragraph contains lines; a caption describes a figure or table. A bounding box locates an item with a rectangle in a specified coordinate system. That rectangle supplies geometry, while a role such as heading or caption supplies an interpretation.

DoclingDocument separates content items from structural trees. Ordered children in the body express reading order; separate page furniture includes surrounding material such as headers and footers. Items can carry geometry and provenance when conversion supplies them. Its internal references identify items within that representation, rather than promising persistent identity across every regeneration.

Containment is one relationship

Example

A document item can participate in containment, scope and association.

In this illustrative representation, the page contains four items. The heading scopes the paragraph, while the caption describes the table.
Read the diagram as text
  • Page.
  • Heading.
  • Paragraph.
  • Table.
  • Caption.
  • PageHeading: contains.
  • PageParagraph: contains.
  • PageTable: contains.
  • PageCaption: contains.
  • HeadingParagraph: scopes.
  • CaptionTable: describes.

Established formats make different choices. hOCR embeds recognized text and spatial metadata in HTML; its boxes use pixel coordinates from the image's top-left corner. ALTO provides XML layout and text metadata, including explicit ordering and processing references. These capabilities matter only when producers populate them.

Treat plain text, Markdown and CSV as projections for particular consumers. Plain text imposes a sequence; Markdown expresses selected structure; CSV represents a rectangular table. None inherently retains all geometry, associations or processing states. Keep original content, normalized derivatives and interpretation separately addressable. The local conversion demonstrated in Structuring the Unstructured illustrates the benefit: table objects remain available for inspection and export instead of disappearing into one text stream.

Text and page structure

Prepare images and preserve coordinates

Rasterization renders a page into pixels. Preparation then addresses specific defects: orientation correction turns an upside-down page, deskewing straightens tilted lines, and cropping removes irrelevant surroundings. Binarization separates foreground from background; dewarping straightens curved page content. These operations change what recognition sees. Aggressive cleanup can remove meaningful marks, so compare the processed image with its source.

Coordinate mappings

Page coordinates and image coordinates are different address systems. PDF page geometry uses points, while rendered images use pixels. Crop settings, rotation and origin conventions affect the mapping. PyMuPDF, for example, distinguishes the full MediaBox, visible CropBox and rotated page rectangle. Use the actual page transforms when moving locations between them; a generic vertical-axis flip is insufficient.

One region in two coordinate frames

Example

The same source content receives different coordinates after cropping, resizing and padding.

Source image

The dashed rectangle is the crop from (100, 200) to (250, 300). R is fully inside it.

01002003004000100200300400Horizontal position (pixels)Vertical position (pixels)Region RCrop boundarySource origin: (0, 0)Crop originR
  • 1. Crop boundary
  • 2. Region R
Read coordinates and regions as data

X: 0400 pixels; Y: 0400 pixels, increasing down. Equal scale on both axes.

Crop boundary (polyline)

(100, 200); (250, 200); (250, 300); (100, 300); (100, 200)

Region R (polygon)

(140, 230); (200, 230); (200, 260); (140, 260)

Source origin: (0, 0): (10, 20)

Crop origin: (100, 185)

R: (170, 245)

Processed image

The crop becomes 300 by 200 pixels. Twenty pixels of padding on every side produce a 340 by 240 image.

01002003004000100200300400Horizontal position (pixels)Vertical position (pixels)Region RProcessed image boundaryCrop boundaryR20 px padding around the resized crop
  • 1. Processed image boundary
  • 2. Crop boundary
  • 3. Region R
Read coordinates and regions as data

X: 0400 pixels; Y: 0400 pixels, increasing down. Equal scale on both axes.

Processed image boundary (polyline)

(0, 0); (340, 0); (340, 240); (0, 240); (0, 0)

Crop boundary (polyline)

(20, 20); (320, 20); (320, 220); (20, 220); (20, 20)

Region R (polygon)

(100, 80); (220, 80); (220, 140); (100, 140)

R: (160, 110)

20 px padding around the resized crop: (20, 270)

Crop at (100, 200), scale by two and add (20, 20) padding. Region R moves from (140, 230)–(200, 260) to (100, 80)–(220, 140). Both panels use the same pixel scale but different image origins.

For a small example, crop an image at origin (100, 200), double its size, then add 20 pixels of left and top padding. A source region from (140, 230) to (200, 260) becomes (100, 80) to (220, 140). To map a recognized box back, remove padding, divide by two and restore the crop origin. Both corners must undergo the mapping.

x=2(x100)+20,y=2(y200)+20x'=2(x-100)+20,\qquad y'=2(y-200)+20 x=x202+100,y=y202+200x=\frac{x'-20}{2}+100,\qquad y=\frac{y'-20}{2}+200 Here (x,y)(x,y) is a source-image position and (x,y)(x',y') is its processed-image position, both measured in pixels.

Rotation may require mapping all corners and retaining a quadrilateral; curved-page correction can require a nonlinear remapping. Retain the transformation actually used. Interpolation changes image samples, and an inverse coordinate map cannot restore cropped-away content. Coordinates and target validity develops the general geometry.

More preparation is not automatically better. The DewarpNet implementation reports character error rates of 0.3136 with an added blur operation and 0.249 without it for its own method. This comparison used 25 images, Tesseract 4.1.0 with default configuration and PyTesseract 0.2.6. It demonstrates a harmful transformation under those conditions, rather than a universal rule against blur.

Recognize character sequences

Text detection locates suitable regions; recognition transcribes them. A recognizer configured for a word, line or full page makes different segmentation assumptions. The detection chapter explains region finding more generally. For documents, the immediate concern is whether each recognition input contains the intended text without combining unrelated content.

The historical Tesseract engine grouped connected image components into lines and words, then recognized words in two passes. Satisfactory first-pass words trained an adaptive classifier used to revisit uncertain cases. This exposed a recurring difficulty: mistakes in character segmentation could constrain recognition before the classifier made its final decision.

A blank preserves a repeated letter

Example

Collapsing adjacent repetitions before removing blanks preserves the two O characters.

1 / 3 · Position labels

Keep the blank as a distinct label.

One illustrative CTC path yields BOOK. The blank separates repeated letters; this trace is a decoding example, not the training calculation over paths.
Read the diagram as text
  • B B O O ∅ O K K. Position labels; ∅ denotes blank.
  • B O ∅ O K.
  • BOOK. Final transcript.
  • B B O O ∅ O K KB O ∅ O K: Collapse adjacent repetitions.
  • B O ∅ O KBOOK: Remove blank.
  1. Position labels. Keep the blank as a distinct label. Active: B B O O ∅ O K K. New: B B O O ∅ O K K.
  2. Collapse repetitions. The blank keeps the O groups separate. Active: B B O O ∅ O K K, B O ∅ O K. New: B O ∅ O K.
  3. Remove blank. Both O characters survive. Active: B B O O ∅ O K K, B O ∅ O K, BOOK. New: BOOK.

Alignment without character boxes

Sequence recognition reduces dependence on individual character boundaries. Shi, Bai and Yao's convolutional recurrent neural network, or CRNN, introduced in 2015, computes visual features—numerical descriptions of image regions—and processes their columns as a sequence. Information travels along the sequence in both directions, supplying neighboring context for transcription. Its experiments used cropped scene words: recognition still required suitable regions. Breuel and colleagues' 2013 printed-text work similarly retained line normalization.

Connectionist Temporal Classification, or CTC, trains with transcript sequences without requiring a label aligned to every input position. Positions predict characters plus a blank symbol. A path becomes text by collapsing adjacent repeated labels, then removing blanks. Training sums over paths compatible with the transcript; the figure shows only one possible path. A separating blank allows two identical letters to survive.

Decoding assumptions also matter. A lexicon restricts outputs to permitted strings; ordinary-word dictionaries can be inappropriate for identifiers or price lists. Blur and unfamiliar fonts affect recognition inputs, while handwriting and mixed scripts require suitable model coverage. Tesseract's printed-text orientation, for example, does not establish handwriting competence. Context can help resolve ambiguity, but a familiar-looking correction must still agree with the page.

Find regions and their roles

Layout analysis identifies page regions and their organization. Finding a rectangle and assigning it a role are different operations: a large region might be a paragraph, table or picture. Whitespace, alignment and typography suggest grouping; learned models can assign categories. A merge across two columns changes what later stages receive even when every character remains readable.

Top-down partitioning starts with a page and divides it. Ha, Haralick and Phillips's 1995 recursive X-Y cut splits at sufficiently large horizontal or vertical gaps. A projection profile summarizes occupied positions along one axis; their method projects connected-component boxes rather than individual pixels. Recursion creates nested rectangular regions, but complex layouts can leave unrelated content in one unsplit leaf. A spatial hierarchy alone supplies neither roles nor reading order.

Bottom-up grouping builds larger regions from smaller nearby components. Mao and Kanungo's 2001 implementation study contrasts Docstrum with X-Y cut: the approaches accommodate different geometric arrangements. It identifies difficulties for Docstrum with nontext regions, irregular spacing and sparse characters. Their own evaluation used deskewed pages, so it did not test their implementation's orientation robustness.

Learned layout analysis needs explicit annotation conventions. Pfitzmann and colleagues at IBM introduced DocLayNet in 2022 with 80,863 manually annotated pages and 11 region classes, broadening coverage beyond scientific articles. Annotators still disagreed over some groupings of subfigures and list items. Preserve pictures, mathematics and unknown regions even when their detailed interpretation is outside the current task; discarded regions cannot support later inspection.

Recover reading order and continuity

Reading order specifies meaningful sequence or precedence among document elements. Reading across two columns line by line can interleave unrelated sentences; completing the first column before the second preserves a different sequence. W3C's PDF reading-order guidance illustrates this failure. Tagged PDFs encode logical order, but conversion can produce incorrect tags, particularly around sidebars, tables and footnotes.

Constructed document example. Reading down each column preserves the two procedures. Sorting all lines by their vertical position would interleave the before-printing and after-printing steps.

Some documents have several legitimate paths. A partial order specifies required precedence without ordering every pair of items. Two independent magazine articles each have a paragraph sequence, but neither article must precede the other. Clausner and colleagues' 2013 study models this distinction. PAGE XML represents ordered and unordered groups separately from physical regions.

Independent reading paths

Example

Local sequence does not require an order between independent articles.

Article A and article B each have ordered paragraphs. The note qualifies A's second paragraph without becoming a required step in either reading sequence.
Read the diagram as text
  • A: first paragraph.
  • A: second paragraph.
  • B: first paragraph.
  • B: second paragraph.
  • Note for A.
  • A: first paragraphA: second paragraph: precedes.
  • B: first paragraphB: second paragraph: precedes.
  • Note for AA: second paragraph: qualifies.

Character direction is another layer. Arabic or Hebrew text can contain left-to-right digits and Latin words. Unicode's bidirectional algorithm distinguishes logical character order from display order; uniformly traversing visible glyphs left to right does not reconstruct every intended string. That specification governs text display, rather than deciding which page region follows another.

Logical structure can also cross page boundaries. Tagged PDF can represent one paragraph through content on two pages. Keep continuation separate from repeated headers, and retain caption and note associations without forcing them into the main sequence. Dehyphenation joins a word split at a line boundary; because it changes the text, the joined word needs a retained correspondence to its original fragments.

Traceability

Locate supporting source material

A source location addresses content in a particular document version. An evidence span identifies the text or regions supporting an extraction. These are related but different: locating a number does not identify every header or note needed to interpret it. Preserve multiple supporting regions when the explanation depends on separated content.

Each address needs its own conventions.
AddressRequired context
Document and pageSource version and page index. Optional labels are display aids, not unique identifiers.
Image regionImage identity, dimensions, coordinate origin, units, crop and rotation history.
Text spanNamed text representation, counting unit, start position and end convention.
Recognized itemItem identifier within an identified extraction result; a model token index addresses a different sequence.

Trace a normalized field

Example

Derivation, text correspondence and spatial location are different links.

An extracted date points to normalized text, literal spans and their page region. A separate context region supports interpretation. Both regions belong to an identified source snapshot.
Read the diagram as text
  • Extracted date.
  • Normalized text span.
  • Literal text spans.
  • Date region.
  • Interpretation context.
  • Identified source snapshot.
  • Extracted dateNormalized text span: derived from.
  • Normalized text spanLiteral text spans: text correspondence.
  • Literal text spansDate region: located in.
  • Extracted dateInterpretation context: interpretation supported by.
  • Date regionIdentified source snapshot: region within.
  • Interpretation contextIdentified source snapshot: region within.

Page labels can use Roman numerals, prefixes or restarted numbering, and need not be unique. PyMuPDF's example labels page index 6 as A-10 and page index 10 as 1. Label metadata can also differ from numbering visibly printed on the page. Retain the actual page index and source version when constructing a review link.

Alignment through transformations

Text transformations change addresses too. Expanding a ligature—a glyph combining multiple characters—or joining line fragments changes string length; reordering paragraphs changes their positions. ICU edit maps retain source and destination spans. They can identify which source span became a replacement without locating each character inside that replacement. Reordered segments need their own mappings. Keep normalization separate from correction, as explained in Meaning-preserving cleaning.

W3C's annotation model provides position selectors and text-plus-context selectors; positions become brittle when the representation changes. Source offsets explains counting units and end-exclusive ranges. Google Document AI separately represents text anchors and page anchors, including multiple regions. Such addresses make checking possible. A model-emitted location still needs to be checked against the page and the field's interpretation.

Document architectures

Combine text, layout and images

A modular route exposes intermediate results that can be inspected separately. The original Docling pipeline obtains native PDF text with coordinates and renders page images. Layout analysis identifies regions and roles; TableFormer recovers table structure. Assembly adds reading order and caption associations. Table cells are matched to available PDF text rather than necessarily retranscribed.

Document models can learn relationships from those inputs. LayoutLM adds two-dimensional positions to recognized words. Its original text-and-layout pretraining is distinct from the image features added for downstream tasks. Pretraining learns reusable representations before task adaptation; Pretraining and Midtraining explains that process. LayoutLM's form experiments assessed semantic labeling: assigning roles to text spans. Recovering which labeled spans belong together is a separate linking task that those results did not evaluate.

Inputs to modular document assembly

Native text supplies content while image analysis supplies structural predictions.

This simplified view of the original Docling route separates native text, page imagery and structural analysis before document assembly.
Read the diagram as text
  • PDF.
  • Native words and coordinates.
  • Rendered page image.
  • Layout analysis.
  • Table structure analysis.
  • Typed document assembly.
  • PDFNative words and coordinates: extract text and geometry.
  • PDFRendered page image: render pixels.
  • Rendered page imageLayout analysis: page pixels.
  • Layout analysisTable structure analysis: table regions.
  • Rendered page imageTable structure analysis: table pixels.
  • Native words and coordinatesTyped document assembly: words and coordinates.
  • Layout analysisTyped document assembly: regions and roles.
  • Table structure analysisTyped document assembly: cells and structure.

Yang Xu and colleagues' LayoutLMv2, published in 2021, includes images during pretraining alongside OCR text and layout. It learns relative spatial relationships and adds training tasks that connect text lines to image regions and check whether text and imagery correspond. The paper tested these additions on DocVQA, a document question-answering benchmark. Using its base-sized models and one pass through the same pretraining corpus, the comparisons showed improved validation results when visual information and the additional training tasks were included. The model still consumes upstream OCR.

The practical advantage of explicit interfaces is diagnostic: inspect the transcript, region assignments and assembled structure before changing downstream extraction. Their cost is that errors can cross interfaces too. The OpenRAG implementation discussion illustrates a configurable choice between focused conversion stages and a document vision-language model. Optional stages add processing work and should be chosen for the information the task requires.

Generate structure from page images

A vision-language model processes images and language together. In an image-to-structure route, an encoder turns page pixels into numerical features. A generator uses those features to emit tokens, units representing text or structural markers, which are converted into fields or document elements. Reading and interpretation thus happen within one model. See Visual features in language responses and Multimodal Models and Applications for the general mechanisms.

Donut removes the separate OCR dependency, while still learning to read. Larger input resolution helped tiny-text questions at greater computational cost. One published failure selected the wrong visible number. Its attention weights indicated which image features the generator used, offering clues to location rather than validated field coordinates.

IBM's Granite-Docling-258M, released September 17, 2025, illustrates a later conversion component. It generates DocTags that can become a DoclingDocument, with instructions for full pages, specified regions and tables. The model remains part of a surrounding conversion library; generating document structure does not remove the need to manage files, preserve provenance and inspect outputs.

Interfaces can also combine native text and imagery. Google's document-processing documentation describes visual PDF processing and, for Gemini 3, supplying extracted native PDF text. Other accepted document types follow a text-only path. Choose an architecture by the information it receives and returns: input detail, inspectable intermediates, supported structure, source locations and processing work. A shorter external pipeline is not itself evidence of better extraction.

Tables and records

Recover table meaning

Table structure consists of rows, columns, cells and spanning relationships. A spanning cell covers more than one row or column. Recovering that structure differs from detecting the table, transcribing its contents and assigning functional roles such as header or row label. A header hierarchy lets a broad heading qualify several subordinate columns. Consequently, a correctly read value can still acquire the wrong meaning through incorrect cell membership.

Microsoft's Table Transformer separates table detection from structure recognition and uses separately supplied OCR or native text to populate exports. Its initial project release was in June 2021; the full PubTables-1M dataset followed that October. The work also addressed inconsistent splitting of spanning headers in reference annotations. Structure models can recover borderless arrangements; visible ruling lines are useful cues, not a requirement that every cell have four drawn sides.

What gives a cell meaning

Example

The value depends on headers and qualifications outside its rectangle.

For the illustrative table, 3* means three observed processing days for Inspection, including one nonworking day.
Read the diagram as text
  • Cell: 3*.
  • Inspection.
  • Observed.
  • Processing time (days).
  • Includes one nonworking day.
  • Cell: 3*Inspection: row label.
  • Cell: 3*Observed: column header.
  • ObservedProcessing time (days): qualified by spanning header.
  • Cell: 3*Includes one nonworking day: asterisk links qualification.

Meaning outside the cell

Illustrative table: a shared heading, “Processing time (days),” spans Planned and Observed. The asterisk means the observed interval includes one nonworking day.
StagePlannedObserved
Inspection23*
Constructed document example. The value 5 inherits North from its row, Standard from its column, days from a spanning header, and a customs-delay qualification from the footnote. Exporting the number alone loses those relationships.

The string 3* becomes useful through several relationships: Inspection identifies the row, Observed identifies the measure, the spanning heading supplies days, and the note qualifies the interval. W3C's multi-level header guidance represents multiple header associations explicitly. JATS table notes demonstrate units inherited from a spanning header and qualifications linked from outside the grid.

Across pages, retain a table's identity while distinguishing repeated headers from new data. Microsoft's template guidance labels a continuing table as one table across pages and calls for representative variations; that is not proof of reliable continuation detection on unfamiliar layouts. Preserve empty cells when they express structure. CSV can carry expanded header names or companion metadata, but the basic grid does not directly express spanning cells, linked notes or source geometry.

Extract fields with context

Key-value association binds a label or semantic role to its value. Proximity helps, but repeated labels, sections and nested records can change which value belongs where. Textract expresses containment through CHILD relationships and key-value association through VALUE relationships. These are different links: being on the same page does not make an address belong to a particular party.

Repeated records add a grouping problem. DocILE, introduced in 2023, distinguishes locating application fields from assigning descriptions, quantities and prices to the correct line item. Selection marks need context too: a checked box in a rating table belongs to both a row question and a response column. Textract records selected and not-selected states, but an undetected mark is neither of those observations.

Literal and interpreted values

Keep observation separate from transformation. Google's published receipt examples retain the literal date 11/12/2022 while normalizing it to 2022-12-11 using French context. Another example supplies a full address through external knowledge although that address is not printed on the receipt. Normalization changes representation under an interpretation rule; enrichment adds information from elsewhere. Neither should silently replace the observed text.

Dates, decimal separators and units require explicit interpretation. For example, treating 1,25 as 1.25 needs an established decimal convention. Computing a balance from a total and deposit adds a calculation with two input dependencies. Preserve the literal values, contextual support and applied rule; preserve ambiguity when that context is insufficient. Meaning-preserving cleaning distinguishes normalization from correcting an erroneous reading.

Large extraction requests can be divided without separating dependent fields. In Building an Agentic Platform, Box describes keeping contract parties and their addresses together when splitting field sets across calls. The general design rule is to partition work around relationships: independently extracting several names and several addresses leaves an association task that still has to be solved.

Check records against their sources

A schema specifies permitted fields, types and constraints. Structural validation checks that representation; semantic validation checks specified relationships, such as date order or compatible units. Check meaning and current state develops these concepts. For document extraction, the additional obligation is to compare the accepted record with the source material it claims to represent.

Peppol rule BR-CO-13 supplies a concrete consistency check: the invoice total excluding value-added tax must equal line net amounts minus document allowances plus document charges. Its executable test compares supplied monetary fields. It does not inspect the page, so passing cannot establish that those fields were faithfully transcribed or correctly associated.

Validation checks establish different properties.
CheckWhat it establishesWhat can remain wrong
Schema validationThe amount has an accepted representation.It came from the wrong row.
ReconciliationSupplied amounts satisfy the chosen equation.An omitted item also disappeared from a recomputed total.
Source associationThe value agrees with its identified label and region.Another required record was omitted.
Completeness inspectionExpected pages and source records were accounted for.Individual interpretations still need checking.

Model agreement provides another signal, not source confirmation. Box describes checking OCR against page images and sometimes comparing multiple vendors' answers. Agreement can prioritize a candidate, but the models may share the same mistaken association. Inspect the label, value and qualifying context that establish the requested field.

Use distinct information states when they change consumer behavior: absent means the relevant source was inspected without finding the field; illegible means a reading cannot be recovered; conflicting means incompatible candidates remain; not applicable means the field does not apply; processing failure means inspection did not finish. Missing-information contracts should preserve these distinctions. The historical TEI transcription guidelines offer a useful precedent by separating gaps, uncertain readings and text supplied by an editor.

Quality and recovery

Measure the required fidelity

Transcription

Measure the output property the task needs. Character error rate, CER, and word error rate, WER, compare a transcription with a reference through edit alignment. They count substitutions, deletions and insertions rather than comparing identical positions in two strings. Their denominator is the reference length in the chosen unit.

error rate=S+D+IN\text{error rate}=\frac{S+D+I}{N} SS counts substitutions, DD deletions, II insertions and NN reference units. Use characters for CER and words for WER. Insertions do not enlarge the denominator, so the rate can exceed one; an empty reference requires an explicit reporting policy.

State how text is normalized before scoring. Lowercasing or removing punctuation changes which errors count; removing punctuation is inappropriate when decimal points matter. Word segmentation also changes WER, particularly across languages. Tools such as JiWER expose transformations and alignments so the scoring contract can be inspected.

Beyond recognized strings

Structure and usefulness require additional measurements.
TargetMeasurement and interpretation
Reading orderCompare predecessor, successor and unordered relationships after accounting for region splits and merges.
Table fidelityGrid Table Similarity, or GriTS, separately compares topology, cell content and location while retaining two-dimensional order.
Field valuesPrecision is matched predictions divided by all predictions; recall is matched reference values divided by all required reference values. Define the matching rule.
Localization and groupingCheck the supporting region and line-item assignment separately. DocILE's main localization measures do not establish transcription or normalization accuracy.
CompletenessAccount for expected pages, regions and records, including failures and unprocessed material.

With exact field-value matching, one wrong value creates both an unmatched prediction and a missed reference value. Abstention removes a prediction but does not remove the required reference field. Report matching rules, aggregation and coverage together; otherwise an apparent gain can come from evaluating fewer outputs.

Whole-document readiness

References should cover the intended layouts, scripts, capture conditions and unfamiliar templates. Keep related pages together when testing transfer to new documents: DocLayNet's controlled experiment obtained higher layout scores when pages from the same documents crossed training and evaluation than when whole documents were separated. DocILE likewise distinguishes unseen layouts from layouts represented during training. Workload coverage explains the general design.

Finally, measure the work remaining. In the CHICA pediatric-clinic pilot, digit recognition accuracy was 98.6%, but only 125 of 221 scanned forms required no verification before data entry. The forms used constrained templates and barcode linkage. High character accuracy and whole-form readiness were different outcomes; neither number alone describes correction effort on arbitrary documents.

Choose what to accept

Extraction confidence is a score intended to indicate reliability for a specified prediction. Word recognition, key-value association and whole-document readiness are different targets. Confidently recognized words can still be attached to the wrong field. A generated self-assessment also needs evaluation against the outcome it claims to predict; its wording does not supply that evaluation.

Calibration asks whether predictions assigned a confidence such as 0.9 are correct about 90% of the time under the evaluated conditions. It differs from accuracy and from ranking useful candidates. An acceptance score may rank reliable cases well without expressing calibrated probabilities. What calibrated confidence means develops this distinction.

Coverage is accepted cases divided by all eligible cases. Selective risk is error among accepted cases; it is undefined when none are accepted. Raising an acceptance threshold can reduce reported error by selecting less work, without improving the extractor. Choose the unit—field, line item or document—and report both quantities. Review capacity and the consequences of wrong acceptance belong in the policy, as explained in Deferral, risk and review capacity.

Basware's 2023 study trained an auxiliary estimator for joint correctness of five invoice fields: number, date, subtotal, tax and total. It calibrated separately without retraining the extractor. On 24,000 test invoices, estimated automation coverage increased from 65.6% to 73.2% at the production system's undisclosed target precision. These were single-page, machine-readable invoices with known templates; unknown templates and multipage invoices were excluded. The result was a test-set estimate, not demonstrated live improvement.

Low scores are not the only reason to inspect a document. AWS's documented Textract review integration distinguishes word confidence, key-value confidence, missing important keys and sampling regardless of confidence. This illustrates targeted review plus auditing of apparently reliable cases; the A2I service is closed to new customers. Source ambiguity remains a separate state: when two interpretations are genuinely supported, retain alternatives rather than treating a high score as resolution.

Recover incomplete and disputed results

Recovery starts by identifying where the required information became unavailable or incorrect. OCRmyPDF can retain the rendered input, the image actually sent to OCR and recognized text. Comparing those artifacts separates rendering, preparation and recognition failures. A better scan addresses inadequate capture; revised segmentation addresses merged regions; neither resolves a genuinely ambiguous label.

Also distinguish unfinished processing from unfinished retrieval. Textract's GetDocumentAnalysis exposes job status and page warnings separately from NextToken, which indicates more result blocks to fetch. API result pages are not document pages. Receiving some fields therefore establishes neither complete retrieval nor successful processing of every source page.

Match recovery to the failure

Example

Useful recovery changes the missing information, failed transformation or unresolved interpretation.

Inspect the cause before choosing an action. Each branch ends in a bounded next action or an explicit partial result.
Read the diagram as text
  • Inspect incomplete or disputed result.
  • Fetch remaining result blocks. Complete result retrieval.
  • Request a better source. Replace inadequate capture.
  • Start a targeted new attempt. Revise preparation or segmentation for the affected region.
  • Request interpretation. Present candidates with source context.
  • Retain explicit partial output. Apply the consumer's eligibility contract.
  • Inspect incomplete or disputed resultFetch remaining result blocks: More result blocks remain.
  • Inspect incomplete or disputed resultRequest a better source: Required detail absent from capture.
  • Inspect incomplete or disputed resultStart a targeted new attempt: Preparation or grouping lost usable detail.
  • Inspect incomplete or disputed resultRequest interpretation: Visible content supports competing readings.
  • Inspect incomplete or disputed resultRetain explicit partial output: Unresolved after available recovery.

Review and correction

A useful review record contains the source version, page and region, surrounding context, candidate values and reason for referral. Vanderbilt's paper-form study placed recognition overlays beside an editable form; selecting a field highlighted the corresponding source location. Its reported review time also changed when handwritten-comment transcription was removed from the task. Review effort therefore depends on scope as well as recognition quality.

Adjudication resolves or records disagreement. Let reviewers distinguish a corrected reading from a supplied interpretation, with the original still available. Review meaningful changes covers the interaction. Record a correction as a derived revision, rerun affected checks, and retain unresolved page, region and field states. A targeted retry should name what changed and terminate with a new result or explicit deferral.

Downstream use

Deliver context with the records

The output contract should let another system interpret the result without silently reconstructing missing document relationships. Deliver values or document elements with source identity and version, locations, required context, interpretation rules and completion state. Partial output eligibility depends on the consumer: an independently supported field may be usable while a document-wide calculation still requires complete coverage.

The illustrative inspection row needs more than its three strings.
Isolated outputInterpretable handoff
Inspection, 2, 3Stage: Inspection; planned processing time: 2 days; observed processing time: 3 days.
Asterisk omittedQualification: observed interval includes one nonworking day.
Source URL aloneIdentified source version plus locations for the row, headers and note; extraction and review state.

A chunk is a bounded retrieval unit; an index is a derived lookup structure. Searchable units and identity explains their design. Docling's chunking interface works from its structured document and carries metadata such as headings and captions. Table chunks can repeat headers, although configuration can omit them. A small chunk is useful only if it retains the context its consumer needs.

Lineage records derivation relationships. Keep mappings from corrected document elements to affected records and chunks, then explicitly replace, invalidate or reinspect those derivatives. A lineage link does not perform the update; Corrections and withdrawals explains that responsibility. Carry required source permissions and handling metadata into the handoff, while enforcing access through the controls described in Privacy and Data Governance.

Open questions

  1. Reliable acceptance on unfamiliar layouts remains difficult because the relationships used by an extractor and its confidence estimator can change together. Progress would demonstrate joint field correctness and useful coverage on held-out templates and multipage documents, rather than transfer thresholds from familiar single-page invoices.

  2. Cross-page table continuity remains a demanding interpretation problem: repeated headers, empty cells and continuation rows can support competing groupings. Progress would preserve and evaluate these links on unfamiliar documents, including uncertainty when the source permits several readings.

  3. Review policies need evidence about the work they actually remove. Faster review can reflect narrower transcription requirements, and source-linked interfaces still depend on human judgment. Progress would compare equal task scopes while measuring residual errors, correction time and reviewer disagreement.

Follow the curated reading path through the speakers and demonstrations behind this entry.

19 min

AI Engineer World's Fair 2025 · 2025

Building an Agentic Platform

Ben Kus

Cited in this entry

Develops the extraction-specific problems of grouping dependent fields, checking page images and using feedback for further attempts.

Watch talk

Explore more talks

The rest of the library, beyond the curated path. Cited talks support this entry; reviewed transcripts were processed in full. Metadata candidates have not been reviewed as sources or verified as topic members.

9 matching talks

TalkSpeakerEventYear
Suman DebnathAI Engineer World's Fair 20252025
Randall HuntAI Engineer World's Fair 20252025
Stefania DrugaAI Engineer Summit 20252025
Samuel ColvinAI Engineer World's Fair 20252025
Nina Lopatina, Rajiv ShahAI Engineer World's Fair 20252025
Philipp SchmidAI Engineer World's Fair 20252025
Stephen Chin, Jonathan LoweAI Engineer Summit 20252025
David KaramAI Engineer World's Fair 20252025
Evaling Video Slop

Transcript reviewed

Maor BrilAI Engineer World's Fair 20262026

References

Coverage and source review
Processed transcripts
13 processed in full · 4 in the curated path
Automated source review
Passed
Metadata candidates
0 unreviewed; not verified topic membership
Corpus version
1bd8e407b26a07b33815594e1b2db5f41827119a2b3cb6fbf240f9fc571fc767

Automated review checks source support; it is not publication approval.

A synthesis of selected conference talks and technical references. Citations link to the source material; they do not imply that every talk on this subject is included.

  1. OpenCV: Geometric Image Transformations

    OpenCV geometric transforms compute destination pixels from corresponding source locations. Affine and perspective transforms use matrices; remap accepts more general coordinate mappings. Fractional source positions require interpolation, and positions outside the image require a border policy. These mappings provide the mechanism for relating processed image regions to source coordinates.

  2. PyMuPDF: OCR — Optical Character Recognition

    Optical character recognition recovers searchable text from images. PyMuPDF can recognize a complete document page or its image areas and retain the result in a TextPage for subsequent extraction. Its image-to-PDF procedure preserves the visible image while adding hidden recognized text. That text does not retain the original font, bold or italic styling. Suggested routing signals include an image covering the page, absent text, or many small graphics representing characters.

  3. Microsoft Document Intelligence: Invoice data extraction

    Microsoft's invoice documentation distinguishes recognized text, tables and invoice-specific fields such as parties, totals and line items. It defines key-value pairs as source spans connecting a label with its associated value and notes that a detected key can have no associated value. Its inspection workflow exposes extracted fields alongside highlighted source text and detected tables.

  4. Building AI Agents that actually automate Knowledge Work

    Incorrect processing of complex document layouts can undermine downstream reasoning regardless of model capability.

  5. PROV-DM: The PROV Data Model

    PROV represents a source snapshot and its summary as distinct entities, with a summarization activity that used the snapshot and generated the summary. wasGeneratedBy can record generation time; wasDerivedFrom links the result to its source. Entity attributes can carry application-specific versions, and revision and invalidation relations describe later changes. Applied to retrieval, retain source identity/version, transformation identity, and separate source, retrieval, and summary-generation times. Freshness requires additional application policy: check the authoritative source's current version or validity, inspect invalidation, and enforce a task-appropriate age limit. Generating a summary today does not make its old source facts current.

  6. Notes on transfer of responsibility for OCR-B standards

    Former OCR-B revision editor K. I. Larsson traces OCR-A and OCR-B to fonts developed for optical recognition during the 1960s in the United States and Europe. The two-part ISO 1073 published in 1976 specified these character sets and their shapes; ISO 1831, published in 1980, addressed printing tolerances. This documents an approach that constrained the printed input as well as specifying the characters to recognize.

  7. An Overview of the Tesseract OCR Engine

    Ray Smith's 2007 account describes Tesseract's development at HP during 1984–1994, initially motivated by scanner applications and poor recognition of imperfect print. HP released it as open source in late 2005. The described engine groups connected image components into lines and words, handles fixed and proportional spacing differently, and recognizes words in two passes. Satisfactory first-pass words train an adaptive classifier; a second pass revisits uncertain words. Page-layout analysis was originally supplied separately.

  8. Computer History Museum: Oral History of John Warnock, Part 2

    John Warnock recalls the early PDF effort as a document-interchange problem: application files and fonts did not transfer reliably between systems. Executing and linearizing PostScript produced explicit page boundaries and drawing operations without the original loops and conditionals. Fonts could be subsetted and packaged with the document. Warnock identifies Peter Hibbard and Richard Cohen as architects of the resulting format and dates his motivating Camelot paper to 1991.

  9. Smithsonian: Farrington Character Sensing Machine 9SP3

    The Smithsonian's accession-based account dates David Shepard and Harvey Cook's Model No. 3 reader to late 1950 and Farrington's commercial sales to 1956. The preserved machine read numbers printed on 51-column tabulating cards and punched the recognized information into those cards. Its application was credit-sales invoice processing, connecting human-readable records to existing punched-card systems. The museum reports that it did not sell widely.

  10. Kurzweil Computer Products: Ray Kurzweil's retrospective account

    Ray Kurzweil describes founding Kurzweil Computer Products in 1974 to recognize varied typefaces. By the end of 1975, the team combined omnifont recognition, a flatbed scanner and speech synthesis into a reading machine, announced in January 1976. Omnifont here means recognition across typefaces rather than requiring one specialized print style. The application let blind readers hear ordinary printed material. Kurzweil describes subsequent uses in database entry, word processing and document ingestion for Lexis and Nexis.

  11. Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks

    CTC learns a distribution over output label sequences without requiring a manually aligned label for each input frame. At each step the network predicts labels plus a blank symbol; multiple frame-level paths collapse to the same shorter output after merging repetitions and removing blanks. Training sums over the alignments consistent with a target sequence. This addresses the mismatch between acoustic time steps and linguistic units, and distinguishes learning an alignment from simply assigning one word to each audio chunk.

  12. Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks

    Alex Graves, Santiago Fernández, Faustino Gomez and Jürgen Schmidhuber introduced CTC at ICML 2006. Its original experiment evaluated phonetic labeling on TIMIT speech, comparing CTC with hidden Markov and hybrid systems. Handwriting appears as a motivating application, not as the reported experiment.

  13. High-Performance OCR for Printed English and Fraktur using LSTM Networks

    Breuel and colleagues applied bidirectional LSTM networks to normalized text-line images in their 2013 printed-text OCR work. Connectionist Temporal Classification aligned transcripts with network outputs without requiring character-segmented training data. Their motivation was that incorrect character segmentation constrained earlier recognizers. Line normalization still mattered because vertical position and scale help distinguish characters. Published examples show recognition of touching characters and ligatures alongside errors involving unusual styles and decoding.

  14. LayoutLM: Pre-training of Text and Layout for Document Image Understanding

    LayoutLM adds page-position information to textual representations so document models can use relationships that a plain word sequence omits. Its preprocessing obtains recognized words and their boxes through OCR, then scales coordinates to a shared range. The paper also incorporates image-region features and adapts the representation to form labeling, receipt extraction and document classification. For forms, it explicitly separates assigning semantic labels from linking entities, and evaluates the labeling task rather than semantic linking.

  15. LayoutLM: Pre-training of Text and Layout for Document Image Understanding

    The KDD 2020 LayoutLM paper is by Yiheng Xu, Minghao Li, Lei Cui, Shaohan Huang, Furu Wei and Ming Zhou. Its architecture diagram combines pretrained text-and-layout representations with separately obtained image features for downstream tasks. This distinguishes the original model from later approaches that integrate image information during pretraining.

  16. OCR-free Document Understanding Transformer

    Donut maps a document image through an encoder and generates a token sequence that can be converted into structured information. The paper's receipt illustration produces item records without consuming an external OCR result. The authors motivate this route partly through error propagation from separately supplied OCR. OCR-free therefore describes the absence of a separate OCR dependency, while the system still learns to read document content.

  17. OCR-free Document Understanding Transformer

    Geewook Kim and the NAVER team presented Donut at ECCV 2022 following a November 2021 preprint. Its experiments show that larger input resolution particularly helps document questions involving tiny text, while increasing computation. The paper visualizes decoder attention as an auxiliary localization indicator without localization supervision. A published failure selects another visible number instead of the requested publication number, illustrating a field-association error despite producing a plausible transcription.

  18. OCRmyPDF: Advanced features

    A PDF can mix born-digital text and scanned content. OCRmyPDF distinguishes skipping pages with text, replacing recognized invisible text, and rasterizing all content before recognition. Redo mode masks visible text while recognizing additional image text, but cannot distinguish OCR painted beneath an opaque image from ordinary visible text. Replacing text can invalidate existing structural tags; OCRmyPDF discards the structure tree when it cannot keep it aligned. A skipped page can remain in the output without OCR.

  19. Error! The text copied from the PDF could not be pasted correctly

    A PDF can display characters correctly while copying or searching produces incorrect text. Callas explains two distinct lookups: selecting a glyph, the font-specific visible shape, and obtaining its Unicode representation. Its inspected example identifies disagreement between a ToUnicode mapping and font-encoding information. Successful rendering therefore does not establish that the embedded text can be extracted faithfully.

  20. Microsoft: Structure of a WordprocessingML document

    WordprocessingML directly represents paragraphs, text runs and text content. A run groups text with shared properties such as formatting. Its document package can also contain separate parts for comments, footnotes, endnotes, headers, footers and styles. The main document body is therefore only one content region: extracting it alone need not recover all textual material in the file. This provides a native structural input that differs from recovering organization from page pixels.

  21. OCRmyPDF: v17 release notes

    OCRmyPDF documents three distinct defects. Version 17.11 fixes redo processing that stacked another OCR layer because removal failed to inspect Form XObjects, embedded containers holding page content. Version 17.8 prevents PDF/A conversion from corrupting non-embedded CID font text layers: Ghostscript font substitution could destroy searchability; automatic mode preserves a regular PDF, while explicit PDF/A requests fail. Version 17.6 removes Adobe's embedded search index because document rewriting makes that index stale and can produce incorrect Acrobat search results.

  22. Docling: Docling document

    DoclingDocument separates content items from document structure. Text, tables, pictures and key-value items reference parents and children through JSON pointers. Separate body and furniture trees distinguish main content from headers and footers. Child order within the body tree represents reading order. Items can carry bounding boxes and provenance, while tables can retain structure annotations.

  23. hOCR 1.2: OCR Workflow and Output embedded in HTML

    hOCR embeds OCR structure and metadata in HTML. Its bounding box is a rectangle specified by left, top, right and bottom coordinates in pixels relative to the document image's top-left corner. Its content-flow property associates separate content areas belonging to the same flow. The specification recommends placing text in reading order and defines engine-specific confidence metadata.

  24. Library of Congress: ALTO — Technical Metadata for Layout and Text Objects

    ALTO provides an XML schema for document layout and text metadata. Its version history documents explicit reading order using ordered groups, unordered groups and element references. Processing references can attach processing history to pages, blocks, lines and strings. Later additions describe page rotation, default language and text direction.

  25. Structuring the Unstructured: Advanced Document Parsing for AI Workflows

    Docling combines OCR and layout analysis into a typed document representation that supports structural inspection and multiple exports, including extracted tables.

  26. Tesseract: Improving the quality of the output

    Tesseract documents recognition failures from noise, uneven backgrounds, thick or thin characters, skew and unsuitable borders. Deskewing rotates a crooked scan so text lines become horizontal; excessive skew harms line segmentation. Recognition also depends on segmentation assumptions: a full page, line and isolated word need different treatment. Dictionaries suited to sentences can be inappropriate for codes or price lists.

  27. PyMuPDF: Appendix 3 — Assorted Technical Information

    Coordinates locate content only relative to a defined origin and coordinate system. PyMuPDF distinguishes image pixels, whose origin is top-left, from page coordinates measured in points. Its documentation explains conversion between PDF and MuPDF spaces with transformation matrices and inverse mappings. It also shows a damaged PDF opening after repair, with warnings and a dirty document state rather than an ordinary untouched input.

  28. PyMuPDF: Page

    PyMuPDF distinguishes the MediaBox from the visible CropBox and the page rectangle after rotation. Its renderer respects page rotation and clips to the intersection of the requested region and CropBox. Separate matrices translate PDF coordinates into MuPDF coordinates and convert between rotated and unrotated page space. For text highlights, the documentation recommends quadrilaterals because their ordered corners retain orientation information that a rectangle alone does not provide.

  29. DewarpNet: Official implementation and OCR evaluation notes

    DewarpNet's authors disclose that their paper's OCR evaluation applied a blur operation before recognition and publish revised results without that operation. For the DewarpNet row, character error rate changes from 0.3136 with blur to 0.249 without blur. The documented evaluation uses 25 images, Tesseract 4.1.0 in its default configuration and PyTesseract 0.2.6. This supplies a controlled preprocessing comparison in which an additional image transformation worsened recognition.

  30. An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition

    Baoguang Shi, Xiang Bai and Cong Yao's CRNN joins convolutional visual features, bidirectional recurrent sequence modeling and CTC transcription in one trainable recognizer. Image features become an ordered sequence of columns, allowing transcription without individual character boxes. Training uses image-level text sequences. The recognizer supports decoding with or without a lexicon, a prescribed set of permitted strings. Experiments demonstrate scene-word recognition using synthetic word images for training; results vary across datasets and lexicon settings.

  31. Tesseract FAQ

    Tesseract's FAQ cautions that handwriting recognition works poorly because the engine is designed for printed text. It also distinguishes recognition from PDF-reader behavior: a searchable PDF appearing to contain only spaces can reflect a reader failing to understand its hidden text layer, rather than a defective PDF; the FAQ suggests checking another reader.

  32. Building an Agentic Platform

    OCR errors contaminate the evidence passed to the model, creating extraction failures that model quality alone cannot resolve.

  33. Docling Technical Report

    Docling's documented pipeline extracts native PDF text with coordinates and renders page images, applies layout and table models, then assembles a typed document with reading order and caption associations. Layout analysis predicts element regions and roles. TableFormer recovers rows, columns, spanning cells and header roles, including tables without complete borders; post-processing matches predicted cells to PDF text instead of retranscribing it.

  34. Structuring the Unstructured: Advanced Document Parsing for AI Workflows

    Losing spatial structure can merge unrelated column text and flatten tables into text that no longer supports reliable extraction.

  35. Recursive X-Y Cut using Bounding Boxes of Connected Components

    Ha, Haralick and Phillips's 1995 method recursively divides a page into rectangular regions at sufficiently large gaps in horizontal or vertical projection profiles. A projection profile summarizes where image components occur along an axis. Their implementation projects connected-component bounding boxes instead of individual pixels to reduce computation, producing a hierarchy of nested regions. The paper acknowledges that complex pages can leave several distinct content regions inside one unsplit leaf.

  36. Empirical Performance Evaluation Methodology and Its Application to Page Segmentation Algorithms

    Song Mao and Tapas Kanungo's March 2001 study implemented both top-down X-Y cut and bottom-up Docstrum segmentation. Their account contrasts X-Y cut's rectangular, deskewed layout assumptions with Docstrum's ability to accommodate nonrectangular arrangements and arbitrary skew. It identifies Docstrum difficulties with nontext regions, irregular font sizes or spacing, and sparse characters. The study's own implementation omitted orientation estimation because its evaluation pages were already deskewed.

  37. DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis

    Birgit Pfitzmann and colleagues at IBM introduced DocLayNet in 2022 to broaden layout coverage beyond scientific articles. It contains 80,863 manually annotated pages with 11 region classes. Their annotation trials found plausible disagreements about grouping subfigures and list items; explicit guidelines resolved some, while some ambiguity remained. A controlled split experiment also showed that mixing pages from the same documents across training and evaluation raised aggregate layout mAP from 72 to 84, compared with separating whole documents.

  38. 2017 PAGE XML Format for Page Content

    PAGE XML records an image filename and dimensions, uniquely identified regions, polygon outlines, region types and text. Region types include pictures, tables, mathematics, noise and unknown content, allowing nontext content to remain represented. Regions can contain subregions, such as table cells or text inside figures. Reading order is stored separately through nested groups containing ordered or unordered region references. Text can be retained at region and line levels.

  39. W3C Technique PDF3: Ensuring correct tab and reading order in PDF documents

    Reading order is the logical sequence consistent with a document's meaning. In tagged PDFs, tag order primarily determines this sequence. W3C illustrates a failure in which two columns are read across both columns instead of completing the first column before the second. Complex layouts containing footnotes, sidebars, graphics and tables can acquire incorrect order during conversion and require repair.

  40. The Significance of Reading Order in Document Recognition and Its Evaluation

    Clausner and colleagues represent independent magazine articles as an unordered group while preserving paragraph sequences inside each article. Their 2013 evaluation compares relations between pairs of regions, including predecessor, successor and unordered relations. Because predicted segmentation can merge or split reference regions, it establishes region correspondences using overlap before assigning weighted penalties. This separates reading-order investigation from text-recognition accuracy and accommodates layouts without one required total sequence.

  41. Unicode Standard Annex #9: Unicode Bidirectional Algorithm, Revision 51

    Unicode distinguishes logical character order in memory from visual display order. Arabic or Hebrew text can contain left-to-right digits and embedded Latin words, producing mixed directions within one line. The bidirectional algorithm determines display ordering from character properties and directional controls; the underlying characters remain interpreted in logical order. Consequently, traversing visible glyphs uniformly from left to right is not a general method for reconstructing the intended string.

  42. Tagged PDF Best Practice Guide: Syntax 1.0.1

    Logical document structure need not restart at page boundaries. The guide represents a paragraph beginning on one page and continuing on another as one paragraph structure element linked to both page-content sequences. It also explains that an empty table-cell element can preserve meaningful table structure. Authoring mistakes can misrepresent paragraphs as tables or split one heading into multiple headings, so existing tags require interpretation and checking.

  43. ICU4J: Edits.Iterator

    ICU's edit representation connects source-string spans and destination-string spans with separate start positions and lengths. It supports mapping indices in both directions. Within a changed span, exact internal correspondence may be unavailable; an interior index maps to the end of the corresponding edit. This provides a concrete mechanism for retaining span relationships when text transformations change length.

  44. Google Document AI: Document REST resource

    Document AI separates document text, page layout and extracted entities. Text anchors reference one or more text segments; page anchors can span pages and multiple polygons. Entities separately expose mention text, normalized values and nested properties. Normalized values can be absent when conversion fails or is unsupported. Entity revisions can record successive extraction stages. The schema also describes OCR text replacements and revision ancestry.

  45. W3C: Web Annotation Data Model

    A TextPositionSelector identifies a text span using an inclusive start and exclusive end. The specification requires its character-counting and normalization conventions to match TextQuoteSelector, which uses selected text plus surrounding context. Position selectors are brittle when a resource changes, so W3C recommends recording state to identify the correct representation. SVG selectors describe nonrectangular regions, including polygons, relative to the source image.

  46. PyMuPDF: Document

    PyMuPDF distinguishes zero-based page indices from PDF page labels. Labels can use Roman numerals, prefixes or restarted numbering, and need not be unique. Its published example labels page index 6 as A-10 and page index 10 as 1. A label lookup therefore returns a list of matching pages rather than assuming one destination.

  47. LayoutLMv2: Multi-modal Pre-training for Visually-rich Document Understanding

    Yang Xu and colleagues' LayoutLMv2 brings image features into pretraining alongside recognized text and layout. It adds relative spatial relationships, text-image alignment and text-image matching objectives. Alignment connects text lines to image regions; matching tests whether document text and imagery correspond. Its controlled DocVQA ablation found improved validation scores when adding visual information and the additional objectives, supporting their contribution beyond merely enlarging the input representation.

  48. OpenRAG: An open-source stack for RAG — Phil Nash

    Docling offers focused extraction models or a task-specific vision-language model, while optional OCR and image descriptions add processing cost.

  49. Forget RAG Pipelines—Build Production-Ready AI Agents in 15 Minutes

    Table misalignment and hallucinated chart extraction can corrupt the evidence supplied to every downstream stage.

  50. IBM Granite-Docling-258M model card

    IBM's model card dates Granite-Docling-258M's release to September 17, 2025. It describes a specialized image-and-text model that generates DocTags for conversion into DoclingDocument and subsequent exports. Supported instructions include full-page conversion, recognition within a specified region, table conversion and document-element identification. IBM positions the model as a component of Docling that consolidates several specialized functions, rather than replacing the surrounding conversion library.

  51. Gemini API: Document understanding

    Google documents different information paths for different file types. PDF processing supports visual document interpretation, while other accepted document types are processed as text without their rendered appearance. The Gemini 3 section additionally states that native PDF text is extracted and supplied to the model. Thus a document-model interface can combine embedded text with page imagery rather than relying exclusively on either representation.

  52. Structuring the Unstructured: Advanced Document Parsing for AI Workflows

    The speaker describes frontier-model conversion as potentially accurate but costly at volume and vulnerable to output variation across runs and model versions.

  53. PubTables-1M: Towards comprehensive table extraction from unstructured documents

    The paper separates table detection, row-column-cell structure recognition and functional analysis of keys and values. It identifies inconsistent splitting of spanning header cells as a ground-truth problem. Evaluation distinguishes exact content agreement in every cell from partial correctness. GriTS separately assesses cell topology, content and location while retaining two-dimensional ordering.

  54. W3C WAI: Tables with Multi-Level Headers

    Complex tables can associate one data cell with several headers, including headers that change partway through the table. W3C represents these relationships using unique header IDs and explicit references from data cells. Its accommodation example associates a value with city, bedroom count and accommodation type, demonstrating why a cell's text alone does not express its meaning.

  55. Microsoft Table Transformer: Official implementation

    Table Transformer recognizes table structure from images using object detection. Its extraction pipeline requires separately supplied text, obtained through OCR or native PDF extraction, to populate HTML or CSV output. The repository provides separate detection and structure-recognition models. Its release history distinguishes the initial project release in June 2021, full PubTables-1M release in October 2021, and detection and structure model weights released in March and May 2022.

  56. NISO JATS: Table Wrapper Footer

    JATS represents explanatory table notes separately from tabular rows. Its published example contains a spanning header that supplies days as the unit for two subordinate columns. Elsewhere in the same table, the value 151/597 references a footnote stating that one trial's data were unavailable. The example makes both relationships explicit: units can come from a higher-level header, while a qualification can live outside the cell grid and be connected by an identifier.

  57. Microsoft Document Intelligence: Custom template document model

    Template models use visual layout cues and suit highly structured documents with defined templates. Microsoft warns that template changes reduce accuracy. Its tabular-field guidance represents a table spanning pages as one table with rows labeled across those pages and calls for examples covering expected single-page and multipage variations. Repeated sections can also be represented as tabular fields.

  58. Amazon Textract: Text Detection and Document Analysis Response Objects

    Textract represents documents as identified blocks connected by typed relationships. A page contains detected items, and a line references its words through CHILD relationships. VALUE relationships connect keys to values. Blocks can also carry confidence and page geometry. Thus containment and field association are represented separately.

  59. DocILE Benchmark for Document Information Localization and Extraction

    DocILE distinguishes identifying and locating application fields from grouping those fields into line items, such as a product's description, quantity and price. Its localization metric checks field type and whether predicted regions capture the intended pseudo-character centers derived from OCR word boxes. Line-item scoring additionally checks assignment to the correct item. Dataset splits distinguish unseen layouts from layouts represented by few or many training examples, making template familiarity an explicit evaluation condition.

  60. Amazon Textract: Selection Elements

    Textract models checkboxes, radio buttons and other selection marks as SELECTION_ELEMENT blocks with SELECTED or NOT_SELECTED status. Marks may occur in form fields or table cells. Its published service-rating table demonstrates that a selected mark must remain associated with both a row question and a response column.

  61. Google Document AI samples: web-app-pix2info-python

    Google's published receipt example exposes different extraction operations. In one receipt, folded paper hides the supplier and mirrored text showing through the reverse side is incorrectly selected as its name. Another example retains the literal date 11/12/2022 while normalizing it to 2022-12-11 using French document context. A separate enrichment example supplies a complete address using external knowledge even though that address is not printed on the receipt. These distinguish observed text, contextual interpretation and externally added information.

  62. Building an Agentic Platform

    Split large field sets into smaller tasks while keeping relationally dependent fields together.

  63. OWASP Input Validation Cheat Sheet

    Syntactic validation checks the form of structured fields; semantic validation checks whether values make sense in their business context, such as a start date preceding an end date. JSON Schema is one supported validation mechanism. Validation applies to potentially untrusted backend feeds and supplier data as well as direct user input. OWASP explicitly cautions that input validation is not the primary defense against SQL injection or cross-site scripting.

  64. Peppol BIS Billing 3.0: Rule BR-CO-13

    Peppol's BR-CO-13 requires the invoice total excluding VAT to equal the sum of invoice-line net amounts minus document-level allowances plus document-level charges. Its executable test compares supplied monetary fields and handles absent allowance or charge totals. This is a concrete internal-consistency check: the test operates on invoice values, without inspecting the page from which an extraction system obtained them.

  65. Amazon Textract: GetDocumentAnalysis

    Textract's asynchronous analysis response separates returned blocks from job status, which can be IN_PROGRESS, SUCCEEDED, FAILED or PARTIAL_SUCCESS. Warning records contain an error code and affected page numbers. Separately, NextToken indicates that additional result blocks remain to be retrieved. The response also exposes the analysis model version. These fields distinguish incomplete processing from incomplete retrieval of an otherwise available result.

  66. Building an Agentic Platform

    Box reports checking extracted answers against page images and, for some difficult questions, comparing answers from multiple vendors' models.

  67. TEI P4 Guidelines: Transcription of Primary Sources

    The TEI guidelines distinguish material that cannot be transcribed, text transcribed with uncertainty and text supplied by an editor. A gap records unreadable or missing material without inserting a guessed reading; unclear marks a reading retained with uncertainty; supplied identifies an editorial replacement. The representation can record reasons, responsibility and the source of supplied text. Its examples preserve the difference between physical loss and a conjectured reconstruction.

  68. Hugging Face Evaluate: Character Error Rate

    Character error rate is CER=(S+D+I)/N, where S replaces a reference character, D deletes one, I inserts an extra character, and N is reference length, equal to S+D+C for C correctly aligned characters. Errors come from edit alignment rather than comparing characters at identical indices. Insertions are absent from the denominator, so CER can exceed one. A short reference makes each error proportionally larger. CER measures transcription disagreement with the reference, not semantic severity.

  69. Hugging Face Evaluate: Word Error Rate

    WER applies Levenshtein alignment to word sequences: WER=(S+D+I)/N, with reference words in the denominator. A one-character misspelling can count as one whole-word substitution, while different tokenization can change insertion and deletion counts. Applying this sequence metric to OCR is valid once the text and word-segmentation conventions are specified. Comparing WER values requires compatible references and tokenization rather than merely the same model name.

  70. JiWER: Text Transformations and Alignment

    JiWER exposes word and character alignments and allows transformations of reference and hypothesis before scoring. Its example removes repeated spaces, strips boundaries, expands a contraction, and converts text into word lists. Therefore normalization is part of the metric contract: case folding, punctuation removal, whitespace handling, or equivalent-string substitutions can remove differences that raw scoring would count. Specify and apply the intended transformation consistently to both sides.

  71. Introduction to Information Retrieval: Precision and recall

    Precision is TP/(TP+FP); recall is TP/(TP+FN). Applying these set definitions to extraction requires a reference set of field-value pairs, predicted pairs, and an explicit matching policy. With exact pair matching, a wrong value produces both an unmatched prediction (FP) and a missed reference pair (FN); missing pairs are FN and extra pairs FP. Abstaining removes predictions, not required reference pairs, so it can reduce coverage. Zero denominators require an explicit reporting convention.

  72. Using Adaptive Turnaround Documents to Electronically Acquire Structured Data in Clinical Settings

    The CHICA pilot generated patient-specific paper forms, linked returned scans to records through barcodes and recognized entries within template-defined regions. Across six clinic days, 224 forms were printed and 221 unique scans received. Of those scans, 125 required no verification before data entry. The remaining forms averaged 1.7 fields needing correction; the authors reported verification taking approximately five to ten seconds. Digit recognition accuracy was 98.6%, illustrating that high character accuracy and whole-form readiness are different outcomes.

  73. Amazon SageMaker AI: Human Loop Activation Conditions for Amazon Textract

    The documented review integration distinguishes key-value confidence from confidence in underlying word blocks. Review can be triggered by confidence conditions, failure to detect an important key or alias, or sampling regardless of confidence. Workers receive selected predictions, or a request to identify a missing key and value. This is a concrete example of targeted review plus auditing beyond low-score cases.

  74. On Calibration of Modern Neural Networks

    Calibration asks whether predictions assigned confidence p are correct about proportion p of the time. Reliability diagrams compare observed accuracy with confidence in bins; expected calibration error averages absolute bin discrepancies weighted by bin population. Calibration differs from prediction accuracy. Selective risk instead measures errors among accepted predictions, and coverage is the accepted fraction. A threshold can alter risk and coverage without demonstrating calibrated probabilities.

  75. Building an Agentic Platform

    Use judge feedback to drive another attempt before presenting an answer, rather than only attaching an uncertainty warning.

  76. Selective Classification: Coverage and Conditional Risk

    A selective predictor combines prediction f with acceptance function g(x) in {0,1}; g=0 means abstention. Coverage is C=E[g(X)], the probability of accepting an input. Selective risk is R=E[loss(f(X),Y)g(X)]/C when C>0: expected loss conditional on acceptance. For N evaluated inputs and A accepted inputs, empirical coverage is A/N; with zero-one loss, empirical selective risk is errors among accepted inputs divided by A. Abstentions remain in the coverage denominator but leave the selective-risk denominator. Consequently lower reported risk can reflect a smaller selected population rather than an improved underlying predictor. Report coverage with risk and examine the risk-coverage curve across selection thresholds.

  77. Failure Prediction in 2D Document Information Extraction with Calibrated Confidence Scores

    Basware's 2023 study trained an auxiliary confidence estimator to predict whether five important invoice fields were all correct: invoice number, issue date, subtotal, tax and total. It combined information across fields and calibrated its scores separately, without retraining the underlying extractor. On an independent 24,000-invoice test set, the authors estimated that automation coverage would increase from 65.6% to 73.2% at the production system's target precision. This evaluates document-level acceptance separately from individual field predictions.

  78. OCRmyPDF: Advanced features — Debugging the intermediate files

    Retained intermediate files distinguish the rendered input page, image actually sent to OCR, preprocessing results and recognized text. For mixed pages, the OCR text artifact need not contain all page text.

  79. Extracting Medical Information from Paper COVID-19 Assessment Forms

    Vanderbilt's document-review interface placed the scanned form with recognition overlays beside an editable form matching its layout; selecting a field highlighted the corresponding location in both views. The study analyzed 2,814 assessment forms and reported mean recognition accuracy of 70% against reviewers' results. Mean review time was 157 seconds per document. Removing the requirement to transcribe handwritten comments reduced reported annotation time from 188 to 156 seconds, showing that reduced work scope can change timing independently of recognition improvements.

  80. Building AI Agents that actually automate Knowledge Work

    A document preprocessing layer should synchronize permissions and metadata alongside content, then parse and index it for agent access.

  81. Building AI Agents that actually automate Knowledge Work

    Encode domain-specific parsing, extraction, and rule matching in an automation workflow that writes structured data to SQL and includes human review.

  82. Docling: Chunking

    Docling describes a chunk as a portion of document content accompanied by metadata. Native chunking operates on the structured document rather than requiring a Markdown-first export. Its hierarchical representation carries headings and captions, and table chunks can repeat headers so separately consumed rows retain column context.

  83. Structuring the Unstructured: Advanced Document Parsing for AI Workflows

    The PDF image extraction demo associates each source picture with its caption and embedded text elements.

  84. AI Engineering with the Google Gemini 2.5 Model Family

    Pydantic schemas turn document extraction into typed data suitable for downstream APIs or databases, but selecting the right schema remains essential.

  85. Introduction to Information Retrieval: Near-duplicates and shingling

    A k-shingle is a contiguous sequence of k terms; each document becomes a set of such sequences. Jaccard similarity is |A intersection B|/|A union B|. A threshold identifies substantial textual overlap. MinHash estimates this similarity because, under a random permutation, the probability that two sets share the minimum element equals their Jaccard similarity. Exact fingerprints and approximate overlap serve different purposes. Application inference: keep document identity, source location, revision identifier, content hash, validity and provenance separately from duplicate-cluster membership. A small change to a date, number or negation can be material despite high overlap.

  86. Forget RAG Pipelines—Build Production-Ready AI Agents in 15 Minutes

    Carry hierarchical metadata and source bounding boxes into chunks rather than retaining only detached text.

  87. SelectiveNet: A Deep Neural Network with an Integrated Reject Option

    Selective prediction pairs predictor f with selection function g: accept when g(x)=1, otherwise abstain. A confidence threshold or learned selection score determines acceptance. Coverage is phi = E[g(X)]; selective risk is E[loss(f(X),Y)g(X)]/phi for phi>0. On labeled evaluation data, measure coverage as accepted cases divided by all cases, and risk as average loss among accepted cases. Varying the threshold produces a risk–coverage curve. SelectiveNet jointly learns prediction and selection while optimizing risk subject to a target coverage constraint. This makes abstention measurable instead of treating a confidence statement as sufficient evidence of reliability.

  88. Building AI Agents that actually automate Knowledge Work

    The Carlyle example places extraction and human review before an analyst copilot for insights and report generation.