Commit a9be45c
feat(pdf): merge paragraph fragments split across column/page breaks
docling joins a paragraph whose previous fragment ends mid-sentence (a letter,
not sentence punctuation) with a lowercase continuation (`…definition of` +
`lists in…` → `…definition of lists in…`); my pipeline emitted two paragraphs.
Add a post-assembly pass that merges consecutive top-level paragraph nodes on that
rule. A heading/table/figure between fragments ends the paragraph.
2203 277→255, 2305v1 68→56, with smaller gains on 2206/redp5110/normal_4pages;
the 4 exact PDFs are unchanged (their paragraphs end with sentence punctuation, so
nothing false-merges).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f88efbf commit a9be45c
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
590 | 623 | | |
591 | 624 | | |
592 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
0 commit comments