Level 4 · Recognition method
Lines, paragraphs, and reading order
The source provides physical fragments. The recognizer must decide which fragments belong to the same logical paragraph and in what order they should be read.
Physical grouping
From glyphs or OCR words to lines and columns
Words are grouped around compatible baselines using tolerances relative to local text size and writing direction. Columns are proposed from whitespace gutters, alignment stops, and interruption patterns rather than fixed horizontal bands.
Candidate reading orders are scored for line crossings, column jumps, heading transitions, and local continuity. Source order, paint order, geometry order, and inferred reading order remain distinguishable when they disagree.
Boundary decision
First group fragments; then assign a role
Paragraph formation and role classification are separate questions. The first asks whether adjacent fragments belong together. The second asks whether the assembled block is a body paragraph, heading, numbered paragraph, list item, quotation, or something else.
Cross-page structure
One paragraph, two page fragments
The clean text reads continuously. The source map preserves both boxes and every intervening page event.
Hard blockers include a new heading, incompatible list marker, table boundary, caption, major style change, or page/section semantics requiring a break. A future language model may contribute one logged feature, but it may not be the only basis or rewrite the text.
Current implementation
Meaning-first assembly is active development
The present detector can create cross-page paragraph candidates, but the active plan records incomplete physical-line assembly, fixed page-band assumptions, punctuation-heavy continuity logic, and exclusions around marked list lines. The current emitter can still label physical lines as paragraphs. Stronger same-page boundaries and complete cross-page assembly are not yet accepted production behavior.