lllin000_PaperForge/paperforge
LLLin000 bd3f3b63e9 fix: sidecar figure caption preservation + rotated table caption matching
37LK5T97 had two bugs:

1. Figure 1 sidecar demotion (ocr_document.py):
   - caption in left column (246px wide), image in right column
   - _is_near_figure_media uses h_overlap which fails for adjacent columns
   - candidate_resolution demoted the caption as 'narrative prose'
   - Fix: add _is_sidecar_candidate check — if figure_caption_candidate
     has vertical overlap with a media_asset but no horizontal overlap
     (adjacent columns), skip the prose-based demotion.
   - New narrow helper, does not change _is_near_figure_media (avoids
     regression in vision_footnote routing)

2. Rotated table caption matching (ocr_scores.py):
   - Tables 1-3 had rotated captions (dir=[0,-1], vertical text)
   - score_table_match only checked x_overlap + asset_below_caption
   - Rotated captions are beside the table body, not above it
   - Fix: when caption has rotated text and x_overlap < 0.5, use
     adjacent-column gap check + y_overlap ratio instead
   - Non-rotated captions unaffected (elif only fires for rotated)

Result: 37LK5T97 Figure 1 matched (figure_001, asset=block_id=9).
All 6 tables (3 rotated + 1 continuation x2 + 1 normal) matched.
428 regression tests pass.
2026-07-02 14:42:59 +08:00
..
adapters feat: add ocr_redo frontmatter field + sync preservation 2026-06-01 11:23:32 +08:00
command_files feat(skills): add /pf-log-reading and /pf-log-session slash commands 2026-05-12 20:55:32 +08:00
commands ocr rebuild: add --resume checkpoint, fix garbled progress bar, remove debug print 2026-06-26 17:31:52 +08:00
core feat: runtime contract hardening + skill/command truth alignment (Package A+B) 2026-05-16 22:38:43 +08:00
doctor chore: commit session work before hotfix switch 2026-05-18 22:47:30 +08:00
embedding chore: commit session work before hotfix switch 2026-05-18 22:47:30 +08:00
memory feat: stabilize paperforge query planning 2026-05-27 21:20:15 +08:00
plugin Merge branch 'ocr-v2' 2026-06-29 02:03:23 +08:00
schema feat: P0 fixes (ref sort, caption insert) + P1 figure containment render hygiene 2026-06-27 22:56:22 +08:00
services feat: P0 fixes (ref sort, caption insert) + P1 figure containment render hygiene 2026-06-27 22:56:22 +08:00
setup fix: remove v prefix from git tag references in install URLs; update versions.json 2026-05-25 11:45:11 +08:00
skills feat: classify OCR errors and degraded completions 2026-06-08 12:34:44 +08:00
worker fix: sidecar figure caption preservation + rotated table caption matching 2026-07-02 14:42:59 +08:00
__init__.py bump: 1.5.14 -> 1.5.15 2026-06-01 19:46:46 +08:00
__main__.py fix: force UTF-8 encoding for all subprocess and stdout on Windows, fix pre-existing logger bug 2026-05-11 19:16:18 +08:00
cli.py ocr rebuild: add --resume checkpoint, fix garbled progress bar, remove debug print 2026-06-26 17:31:52 +08:00
config.py feat: runtime contract hardening + skill/command truth alignment (Package A+B) 2026-05-16 22:38:43 +08:00
logging_config.py chore: rename PaperForge Lite -> PaperForge across 27 files 2026-04-28 01:25:51 +08:00
ocr_diagnostics.py feat: bump PaddleOCR model from VL-1.5 to VL-1.6 2026-06-01 00:32:46 +08:00
pdf_resolver.py fix: add creators/extra to load_export_rows row dict, fix journal key lookup for first_author/journal/IF in library-records; add first_author, journal, impact_factor columns to Base views; fix PDF storage/ subdirectory resolution 2026-04-27 20:25:35 +08:00
query_planning.py style: fix lint issues in new Phase4.1/Phase5 code 2026-06-05 12:23:55 +08:00
setup_wizard.py feat: add Gemini CLI agent platform support (.gemini/skills) 2026-06-01 19:46:17 +08:00