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
modelBboxRectOne 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.
attributepageint1-based source page number.
attributex0floatLeft edge in points.
attributey0floatTop edge in points.
attributex1floatRight edge in points.
attributey1floatBottom edge in points.
TableSpan
modelTableSpanPosition 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_idstrThe original ⟦tbl-N.html⟧ placeholder id
(for example "tbl-3.html").
attributestart_charintStart position in ChunkResult.content
(substituted form).
attributeend_charintExclusive end position in ChunkResult.content.