pub fn reconstruct(pages: &[Page]) -> DocumentExpand description
Turn a page’s raw text spans into the semantic Document AST: split each
page into reading-order columns, group spans into lines, then classify
each line (or run of lines) as a heading, list, table, figure caption, or
paragraph. A final pass repairs the one join a per-page pipeline cannot
see by construction: a paragraph split across a page break (see
merge_page_breaks / kopitiam-d3n).