## OCR types


## ocr.Box


Pixel rectangle in top-left-origin image coordinates.


Usage

``` python
ocr.Box(
    x,
    y,
    width,
    height,
)
```


#### Parameter Attributes


`x: int`  

`y: int`  

`width: int`  

`height: int`  


## ocr.OcrToken


A single recognized token with its bounding box and recognizer confidence.


Usage

``` python
ocr.OcrToken(text, box, confidence)
```


#### Parameter Attributes


`text: str`  

`box: `<a href="ocr-types.html#athome.ocr.Box" class="gdls-link gdls-code"><code>Box</code></a>  

`confidence: float`  


## ocr.Document


A page read by a document-OCR engine.


Usage

``` python
ocr.Document(markdown, tokens=())
```


#### Parameter Attributes


`markdown: str`  

`tokens: tuple[`<a href="ocr-types.html#athome.ocr.OcrToken" class="gdls-link gdls-code"><code>OcrToken</code></a>`, …] = ()`    


#### Attributes

| Name | Description |
|----|----|
| [text](#athome.ocr.Document.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

``` python
ocr.TokenOcr()
```


## ocr.DocOcr


Page-level document OCR (VLM engines): image in, structured markdown out.


Usage

``` python
ocr.DocOcr()
```
