Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

Text extraction

Also: parser, parsing

In plain words

Pulling the words out of a file like a PDF so a program can use them.

A picture of words is not words
Scanned page

To a computer this is a photo. It cannot search it or copy a sentence out of it.

After OCR

The photo is read into real text. Now it can be searched, copied, and given to a model.

OCR makes mistakes on poor scans, handwriting, and tables. A missed page or a misread number travels silently into everything built on top of it.

The fuller definition

Text extraction obtains text from a digital document. Parsing interprets its structure, such as headings, tables, or fields, into a usable representation.

Go deeper

Keep the source attached as a document becomes usable text
A01 · PAGE 2

Delivery may be possible in April.

Subject to inspection.

CHUNK 1 · A01 / P2

Delivery may be possible in April. Subject to inspection.

METADATA

source_id: A01
page: 2
version: original

This fictional example keeps a condition beside the proposition it qualifies. Extraction and chunking should preserve enough context to inspect what the source actually says.

A concrete example

A PDF parser extracts text and page references from a digitally created contract.

The distinction that matters

A PDF can contain selectable text yet yield a poor reading order or broken tables.

Related terms

Where it is taught

How document-grounded AI answers work

Source and further reading

Sentence Transformers · Semantic search

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC