Layout, blocks, geometry¶
Block¶
Reading-order-grouped paragraph with bounding box, layout class, and content.
Emitted on the response when include_blocks=True.
Block
¶
Bases: _Frozen
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
TYPE:
|
layout_id |
TYPE:
|
class_name |
TYPE:
|
bounding_box |
TYPE:
|
content |
TYPE:
|
order_index |
TYPE:
|
TextItem¶
A single recognised word/line with confidence and bounding box.
TextItem
¶
Bases: _Frozen
| ATTRIBUTE | DESCRIPTION |
|---|---|
text |
TYPE:
|
confidence |
TYPE:
|
bounding_box |
TYPE:
|
id |
TYPE:
|
layout_id |
TYPE:
|
source |
TYPE:
|
source
class-attribute
instance-attribute
¶
BoundingBox¶
BoundingBox
¶
LayoutBox¶
LayoutBox
¶
Bases: _Frozen
| ATTRIBUTE | DESCRIPTION |
|---|---|
class_name |
TYPE:
|
class_id |
TYPE:
|
confidence |
TYPE:
|
bounding_box |
TYPE:
|
id |
TYPE:
|
LayoutLabel¶
LayoutLabel
¶
Bases: StrEnum
supplementary_region
class-attribute
instance-attribute
¶
Table¶
Table
¶
Bases: _Frozen
A recognized table.
Server-recognized tables (tables=True, SLANet-Plus) carry html (the
full <table> markup), layout_id, and the recognizer confidence.
Tables synthesized from layout blocks (no table backend requested) carry
only the region text and id.
| ATTRIBUTE | DESCRIPTION |
|---|---|
bounding_box |
TYPE:
|
html |
TYPE:
|
layout_id |
TYPE:
|
confidence |
TYPE:
|
id |
TYPE:
|
text |
TYPE:
|
Formula¶
Formula
¶
Bases: _Frozen
A recognized formula.
Server-recognized formulas (formulas=True, PP-FormulaNet) carry
latex, layout_id, and the recognizer confidence; text mirrors
latex so downstream code can treat both sources uniformly. Formulas
synthesized from layout blocks carry only the region text and id.
| METHOD | DESCRIPTION |
|---|---|
model_post_init |
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
bounding_box |
TYPE:
|
latex |
TYPE:
|
layout_id |
TYPE:
|
confidence |
TYPE:
|
id |
TYPE:
|
text |
TYPE:
|
is_inline |
TYPE:
|
Tables and formulas are strict opt-ins
Pass tables=True / formulas=True (server v3.1+, with
TABLE_BACKEND=slanext / FORMULA_BACKEND=ppformulanet_s loaded) and the
server recognizes structure: Table.html carries full <table> markup
and Formula.latex the LaTeX source, each with a recognizer
confidence. Without the opt-in the SDK synthesizes region-level
entries from layout blocks (text only; html / latex stay None).
Requesting a stage the server doesn't have raises BackendDisabled —
check client.capabilities() first.