Commit graph

3 commits

Author SHA1 Message Date
Research Assistant
e61703d3fb style: fix ruff lint issues in bio detection files
- SIM103: return conditions directly instead of if/else pattern
- F541: remove extraneous f-string prefix
- I001: organize imports
2026-06-29 02:02:53 +08:00
Research Assistant
bf5b9e756b feat: add P1 author bio detection passes
- residual_author_bio_pass (Pass B): detects portrait unmatched_assets
  and unresolved_clusters with nearby bio text, reclassifies as
  author_bio_asset
- Extend post_ref_bio_cleanup (Pass C) to handle figure_caption role
- Wire Pass B before Pass C in ocr.py pipeline
- Add tag_figure_contained_text protection: skip author_bio blocks
  and author_bio_asset role
- 7 new P1 tests, 1018 total OCR tests pass, 0 regressions

Part of P1 bio detection (spec v3 §7-8, Tasks 4-5).
2026-06-29 01:29:08 +08:00
Research Assistant
30c1ef5c3a feat: add bio detection utilities and post_ref_bio_cleanup
- _bio_text_score: category-weighted 0-5 scoring with career/education/
  research/institution/publication categories
- _is_portrait_like / _any_portrait_like: image profile card detection
- _has_formal_figure_number: guard for Fig./Table/Scheme prefixes
- _looks_like_reference: guard for [N] + et al/year patterns
- _nearby_blocks: spatial proximity search with cluster_bbox support
- _resolve_ref_start_page: reference zone page detection
- _add_block_keys / _any_bio_text helpers
- post_ref_bio_cleanup: detects author bio text in post-ref reference_zone
  blocks and overrides role to backmatter_body
- _is_strongly_figure_matched: guards against figure-matched blocks
- _is_protected_strong_figure / _is_reversible_weak_figure_match:
  strong vs weak figure settlement type classification
- prune_figure_inventory_after_bio: removes bio artifacts from
  ambiguous_figures and held_figures before reader

Part of P0 bio detection (spec v3 §4-5, §8, Tasks 1+2).
2026-06-29 01:24:33 +08:00