fix(layout): veto side-by-side split that cleaves a rect table (#156)
A 4-column compliance table (labels + Small/Medium/Large) was emitted as two separate tables: split_side_by_side read the text gap between the ruled and remaining columns as a page-layout gutter, and each band then detected its own fragment. Before accepting a side-by-side split, check rect clusters near the boundary: if a table-shaped cluster spans it (or ends at it with cell-like text row-aligned beyond), and those table rows account for the majority of far-side text, the split runs through a table — veto it. The majority guard keeps legitimate splits on pages where a figure spans two prose columns. opendataloader-bench: overall 0.8306 -> 0.8362, TEDS 0.656 -> 0.675, target doc +0.506, no regressions. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
20bb22aa3c
commit
2f5a8923dd
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
mod detect_heuristic;
|
||||
mod detect_lines;
|
||||
mod detect_rects;
|
||||
pub(crate) mod detect_rects;
|
||||
mod detect_struct;
|
||||
mod financial;
|
||||
mod format;
|
||||
|
||||
Reference in New Issue
Block a user