jedarden
|
cce26bb6b6
|
feat(pdftract-64j83): implement column label assignment to Span.column + Line.column
- Add column: Option<u32> field to Span in hybrid.rs
- Create layout/columns.rs module with:
- Column struct (index + x_range)
- assign_columns_to_spans() - assign by x_range containing bbox[0]
- assign_columns_to_lines() - propagate via mode (>50% dominance)
- HasBBoxAndColumn and HasSpansWithColumn traits
- Update layout/mod.rs to export column types
- Fix test fixtures in inspect/render (add column: None)
Acceptance criteria:
- 2-column page span at x0=50 -> Some(0), x0=350 -> Some(1)
- Full-width heading line -> None (mixed spans)
- Single-column page -> all spans Some(0)
- Inter-column gap -> None
Closes: pdftract-64j83
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-24 14:45:19 -04:00 |
|