soev for developers
soev-indexingReference

soev_indexing.contracts

The parts of a chunk that a consumer stores with it: its rectangles and the positions of its tables.

Chunk records

ChunkResult.bboxes and ChunkResult.tables hold these records.

BboxRect

modelBboxRect

One cited rectangle of a chunk on a source page.

Coordinates are PDF points with a top-left origin (the BBox convention from soev_indexing.parsing).

page is 1-based. A consumer that counts pages from 0 converts it.

attributepageint

1-based source page number.

attributex0float

Left edge in points.

attributey0float

Top edge in points.

attributex1float

Right edge in points.

attributey1float

Bottom edge in points.

TableSpan

modelTableSpan

Position of one substituted table within a chunk's content.

A step that puts the table HTML of a parse result in place of its placeholders records one for each table. With the ranges, a consumer can cut the tables out of the text by position, with no string match. The chunkers of this package substitute no tables, so their ChunkResult.tables is empty.

attributeplaceholder_idstr

The original ⟦tbl-N.html⟧ placeholder id (for example "tbl-3.html").

attributestart_charint

Start position in ChunkResult.content (substituted form).

attributeend_charint

Exclusive end position in ChunkResult.content.

On this page