OCR types
ocr.Box
Pixel rectangle in top-left-origin image coordinates.
Usage
ocr.Box(
x,
y,
width,
height,
)Parameter Attributes
x: inty: intwidth: intheight: int
ocr.OcrToken
A single recognized token with its bounding box and recognizer confidence.
Usage
ocr.OcrToken(text, box, confidence)Parameter Attributes
text: strbox: Boxconfidence: float
ocr.Document
A page read by a document-OCR engine.
Usage
ocr.Document(markdown, tokens=())Parameter Attributes
markdown: strtokens: tuple[OcrToken, …] = ()
Attributes
| Name | Description |
|---|---|
| text | The markdown stripped of formatting: headings, emphasis, and table pipes |
text
The markdown stripped of formatting: headings, emphasis, and table pipes
text: str
removed, cell text preserved, code fences unwrapped, into plain lines.
ocr.TokenOcr
Token-level OCR: geometry + confidence per token (the ensemble substrate).
Usage
ocr.TokenOcr()ocr.DocOcr
Page-level document OCR (VLM engines): image in, structured markdown out.
Usage
ocr.DocOcr()