Commit 41be9a1
feat(pdf): make the docling-parse line sanitizer the default
Flip the prose reconstruction to dp_lines (the docling-parse sanitizer port) by
default; `DOCLING_LEGACY_LINES` restores the old gap-heuristic path. Routed
through a single `use_dp_lines()` helper (pdfium_backend), used by page_cells and
by assemble's cell-join + clean_text branches.
PDF conformance default 3/14 → **4/14** (multi_page now byte-exact), with the rest
markedly closer: 2206 200→168, redp5110 300→243, 2305v1 110→64, normal_4pages
108→82, 2203 309→263, table_mislabeled 113→102. The 3 previously-exact PDFs stay
exact. DOCX/HTML/etc. are unaffected (the sanitizer is PDF-only). Updated the
clean_text unit test for the preserve-spacing default.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 11f1fe0 commit 41be9a1
2 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
582 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
583 | 584 | | |
584 | 585 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
225 | | - | |
| 232 | + | |
226 | 233 | | |
227 | 234 | | |
228 | 235 | | |
| |||
0 commit comments