Commit graph

250 commits

Author SHA1 Message Date
Research Assistant
3e748dcb5d fix: gate weak boundary signals through backmatter_boundary_candidate 2026-06-07 00:59:22 +08:00
Research Assistant
32c87a903d test: add tail reading order stabilization regression test 2026-06-06 19:37:08 +08:00
Research Assistant
45768a6d5f fix: restore figure pipeline, fix Funding suppression, tighten candidate resolution 2026-06-06 19:11:51 +08:00
Research Assistant
fe1d9467ca fix: make figure inventory distrust bad legend roles with prose narrative check 2026-06-06 18:50:47 +08:00
Research Assistant
9bfd4354ca fix: add candidate resolution and activation gates to document normalization 2026-06-06 18:46:20 +08:00
Research Assistant
e071a0b6f5 fix: demote ambiguous seed roles to candidates (figure_caption, backmatter_heading) 2026-06-06 18:40:24 +08:00
Research Assistant
5c7e439696 fix: render mixed tail pages with layout-aware reference zones 2026-06-06 17:57:55 +08:00
Research Assistant
5cbf6ae066 fix: make reference rescue depend on local reference zones 2026-06-06 17:39:15 +08:00
Research Assistant
32e4a67f8d refactor: add local reference zones and layout-aware tail boundary detection 2026-06-06 17:35:08 +08:00
Research Assistant
9f0bc39692 feat: derive layout-aware tail reading segments 2026-06-06 17:28:03 +08:00
Research Assistant
2c7ab8aa62 feat: persist layout-aware OCR tail analysis artifacts 2026-06-06 17:25:47 +08:00
Research Assistant
c21f04d7b6 feat: add page layout profiling for OCR document analysis 2026-06-06 17:23:41 +08:00
Research Assistant
c56ce87a1c fix: add relational-operator spacing and Greek-letter preservation to math normalization 2026-06-06 17:19:33 +08:00
Research Assistant
cdf7deffc9 fix: catch body-width continuation fragments in non_body_insert detection
Block 35 in SAN9AYVR was a biography continuation fragment that escaped
non_body_insert detection because it shared the same width and font as
the body spine.  Added a second-pass expansion in
_detect_non_body_insert_clusters that catches orphan continuation
fragments (lowercase start, same font as insert cluster, adjacent to
detected insert) and marks them as non_body_insert.

Regression test: test_non_body_insert_catches_continuation_fragment
2026-06-06 17:14:43 +08:00
Research Assistant
06d7abb2fa feat: unify OCR math normalization across render and objects 2026-06-06 17:02:01 +08:00
Research Assistant
4ecdee5ff6 fix: close residual non-body insert leakage from figure_caption blocks 2026-06-06 16:50:49 +08:00
Research Assistant
e41895d4d6 fix: add geometry guard to non_body_insert rescue — narrow blocks (<35% page width) stay non_body_insert regardless of font match; require strong non_body_insert_family quality for reinstatement 2026-06-06 16:22:46 +08:00
Research Assistant
0175fc3ab3 fix: tighten non_body_insert detection and rescue — exclude frontmatter_noise from role filter, require moderate+ family quality for reinstatement 2026-06-06 16:15:38 +08:00
Research Assistant
463852462f fix: stop legend-only figures from using fake unmatched assets 2026-06-06 16:08:26 +08:00
Research Assistant
dcfbe8bb64 fix: exclude non-body insert media from figure asset pool 2026-06-06 16:06:36 +08:00
Research Assistant
cb3f459ba2 fix: prioritize formal figure legends over panel subcaptions 2026-06-06 16:01:57 +08:00
Research Assistant
69a1156449 fix: expand non_body_insert detection to catch frontmatter_noise blocks; use relative page bound
- Expand role filter in _detect_non_body_insert_clusters from body_paragraph
  only to include frontmatter_noise and unknown_structural
- Replace absolute page<=3 gate with relative bound based on body_end_page:
  max_early_page = min(3, body_end_page/4 + 1)
- Added test_detect_non_body_insert_catches_frontmatter_noise_blocks
2026-06-06 15:56:14 +08:00
Research Assistant
67bd36c997 refactor: make document structure the single render truth
- build_structured_blocks now returns (rows, doc_structure) tuple
- ocr.py and ocr_rebuild.py pass document_structure to render_fulltext_markdown
- bare except Exception replaced with structured logging
2026-06-06 15:52:18 +08:00
Research Assistant
3dc06eb9db feat: derive section family profiles from normalized OCR structure 2026-06-06 15:49:50 +08:00
Research Assistant
fd00a5add2 fix: guard rescue from promoting non_body_insert blocks to body roles 2026-06-06 13:50:24 +08:00
Research Assistant
b4951597e7 feat: add non_body_insert role for early-page non-body insert clusters 2026-06-06 13:48:30 +08:00
Research Assistant
936902a7d6 feat: add Zotero-anchored author alignment check in resolve_metadata 2026-06-06 13:33:20 +08:00
Research Assistant
c974ba7480 fix: remove open-ended authors text heuristics, anchor to page-1 zone only 2026-06-06 13:28:46 +08:00
Research Assistant
5566b2f992 fix: map OCR bbox coordinates to PDF space before span extraction 2026-06-06 12:59:06 +08:00
Research Assistant
6bbe00204c feat: add section-aware OCR rescue pass 2026-06-06 12:34:53 +08:00
Research Assistant
e03a50ea53 refactor: extract OCR document structure analysis into ocr_document.py 2026-06-06 12:30:44 +08:00
Research Assistant
fdc1cdf301 feat: extract span_metadata from source PDF via PyMuPDF, wire into both pipelines 2026-06-06 11:44:14 +08:00
Research Assistant
be818f4deb fix: revert PaddleOCR span_metadata passthrough — source is PDF, not OCR engine 2026-06-06 11:42:40 +08:00
Research Assistant
118f643951 feat: second-pass cross-validation for low-confidence role assignments using span profiles 2026-06-06 11:27:44 +08:00
Research Assistant
9006807127 feat: dynamic heading family discovery with profile matching, remove hardcoded font-size thresholds and absolute page gate 2026-06-06 11:21:25 +08:00
Research Assistant
94de2dbbc7 feat: persist role_span_profiles.json and wire into rebuild pipeline 2026-06-06 11:16:43 +08:00
Research Assistant
5320e825ee fix: remove dead constants, tighten profile quality test assertion 2026-06-06 11:15:41 +08:00
Research Assistant
2604a1c5cf feat: create ocr_profiles.py with span extraction, profile aggregation, and cross-validation 2026-06-06 11:13:01 +08:00
Research Assistant
f67c7d5ac0 feat: carry span_metadata through raw and structured block pipeline 2026-06-06 11:08:44 +08:00
Research Assistant
7c278fbc60 fix(ocr): properly cluster multi-panel figures — role assignment, cluster bbox crop, render visibility 2026-06-06 10:08:42 +08:00
Research Assistant
c235dbdc68 feat(ocr): journal layout generalization, OCR diagnostics, and debug scripts 2026-06-06 00:46:49 +08:00
Research Assistant
d52ea37e92 feat(ocr): tail regime remediation + style-aware heading profiles + boundary detection
- Task: Bidirectional body/backmatter boundary detection (forward/backward spine + tail spread reconciliation)
- Task: Style-aware heading profiles from PDF span_metadata (extract, cluster, disambiguate)
- Task: Lock tests for tail-candidate overreach, cross-page continuation, style-aware heading detection
- 296/296 tests pass, real-paper 7C8829BD verified
2026-06-05 22:47:13 +08:00
Research Assistant
2e2e8cb8e4 Revert "revert: restore original Phase 2 figure/table matching logic"
This reverts commit 0a2988b89f.
2026-06-05 15:38:04 +08:00
Research Assistant
0a2988b89f revert: restore original Phase 2 figure/table matching logic 2026-06-05 15:36:59 +08:00
Research Assistant
cff4107633 fix: stabilize object notes, render heading sanity, health/index detection 2026-06-05 15:13:33 +08:00
Research Assistant
174d2e8ccd fix: stabilize OCR table matching and image-first rendering 2026-06-05 15:11:20 +08:00
Research Assistant
0e41454748 fix: harden OCR figure legend detection and matching 2026-06-05 15:09:47 +08:00
Research Assistant
0d9725808f fix: strengthen tests, clean object-note format, fix assets_path compat 2026-06-05 15:04:21 +08:00
Research Assistant
009be8c958 fix: stop paper_title pollution, text-to-heading, table HTML leak, author recovery 2026-06-05 15:02:00 +08:00
Research Assistant
e7c942f68b fix: correct title via Zotero frontmatter, anchor figure/table placement, fix page markers and wikilinks 2026-06-05 13:50:26 +08:00