jedarden
|
4409eff058
|
feat(pdftract-88sk): fix 5x3 table test and add benchmark
Fix the critical 5x3 bordered table test to match acceptance criteria
(5 rows × 3 columns = row_ys.len() == 6, col_xs.len() == 4).
Add missing unit tests:
- test_detect_nested_rectangles: tests handling of nested rectangles
- test_detect_disjoint_tables: tests detection of multiple disjoint tables
Add Criterion benchmark for table detection performance.
Results: ~772 µs for 1000 segments (well under 5 ms requirement).
All 35 table module tests pass.
Acceptance criteria:
- ✅ Detector emits GridCandidate for every closed grid of >= 4 cells
- ✅ Critical test: 5x3 bordered table with row_ys.len()==6, col_xs.len()==4
- ✅ Unit tests: single rectangle, nested rectangles, mixed text+rules, glyph-path noise
- ✅ Public TableDetector::detect_line_based(&PageContext) -> Vec<GridCandidate>
- ✅ Benchmark: < 5 ms on 1000-segment page
Refs: pdftract-88sk, plan section 7.2 line 2571
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-05-23 21:40:57 -04:00 |
|