vibe.review.parsing.layout.nodes¶
Layout layer node types.
These represent the physical/visual structure of a document page: - LayoutLine: A horizontal sequence of words - LayoutBlock: A visual block (paragraph, table cell, etc.) - LayoutRegion: A page region (header, footer, column, margin) - LayoutPage: Complete page layout with all blocks and regions
RegionType ¶
Types of page regions.
LayoutLine ¶
A horizontal line of text (sequence of words).
Words are grouped into lines based on vertical position and horizontal proximity. Lines preserve word order and spacing.
| Attributes: |
|
|---|
LayoutBlock ¶
A visual block of content (paragraph, list item, table, etc.).
Blocks are groups of lines that form a cohesive visual unit. Block classification (heading, paragraph, list) happens in the structure layer; here we just track visual properties.
| Attributes: |
|
|---|
dominant_font_size ¶
dominant_font_size: float | None
Get the most common font size across all lines.
LayoutRegion ¶
A rectangular region on a page.
Regions partition the page into semantic areas (header, footer, body columns, margins). Blocks are assigned to regions based on their position.
| Attributes: |
|
|---|
contains_bbox ¶
Check if a bounding box is mostly inside this region.
LayoutTableCell ¶
A single cell in a layout table.
| Attributes: |
|
|---|
LayoutTableRow ¶
A row in a layout table.
| Attributes: |
|
|---|
LayoutTable ¶
A table detected in the layout.
Tables are detected when YOLO identifies a "table" region and column boundaries can be determined from text position clustering.
| Attributes: |
|
|---|
ColumnDetectionResult ¶
Column detection details for a page.
LayoutPage ¶
Complete layout analysis for a single page.
Contains all blocks and regions detected on the page, plus metadata about the page dimensions and layout characteristics.
| Attributes: |
|
|---|
get_region ¶
get_region(x: float, y: float) -> LayoutRegion | None
Get the region containing a point.