Implement repair_hyphenation() that detects and repairs end-of-line hyphenation within blocks. Joins hyphenated words across line breaks when the hyphen is at the column right edge and the continuation starts with a lowercase letter. Key features: - Detects hyphens: -, ‐ (U+2010), ‑ (U+2011), soft hyphen (U+00AD) - Right-edge detection: span bbox.x1 within 5% of column width - Lowercase continuation check to avoid joining sentences - Column-aware: only joins spans in same column - Cleans up empty spans/lines after repair Adds HasBBox and HyphenableSpan traits for flexible span types. Includes 9 comprehensive tests covering all acceptance criteria. Fixes pre-existing test cases in schema module (missing column field). Closes: pdftract-5o6hx Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| pdftract-cer-diff | ||
| pdftract-cli | ||
| pdftract-core | ||
| pdftract-libpdftract | ||
| pdftract-py | ||