Add Phase 4 caption classification for detecting figure captions. Implements classify_caption() which identifies blocks as captions when: - Small font size (median < page body median) - Follows Figure block within 2 line heights - Same column as Figure Module: crates/pdftract-core/src/layout/caption.rs Acceptance criteria: - Block immediately below Figure, small font, same column → kind: Caption - Block 5 lines below Figure → NOT Caption (gap too large) - Block with body-size font below Figure → NOT Caption (font not smaller) - Block in different column from Figure → NOT Caption Tests: 9/9 passed covering all acceptance criteria plus edge cases. Closes: pdftract-xzfkt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| pdftract-cer-diff | ||
| pdftract-cli | ||
| pdftract-core | ||
| pdftract-libpdftract | ||
| pdftract-py | ||