Skip to content

chore: bump fig-extract to v2.11.0#29

Merged
onetwothr1 merged 1 commit into
devfrom
chore/bump-fig-extract-2.11.0
Jul 23, 2026
Merged

chore: bump fig-extract to v2.11.0#29
onetwothr1 merged 1 commit into
devfrom
chore/bump-fig-extract-2.11.0

Conversation

@onetwothr1

@onetwothr1 onetwothr1 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

엔진 fig-extract.js를 v2.10.2 → v2.11.0으로 벤더링. [계약 무변경].

엔진 변경 (캡션 문법 확장 M1·M2)

보충/부록 캡션의 inline 표기를 새로 탐지해 점형 canonical(S.N·A.N)로 방출:

  • 문자접두 inline 번호 Fig. S1.·Figure S1:·Figure A1. (번호 클래스 [A-DS]\.?\d+ 공유)
  • Supplemental/Supporting/Supp. 접두 추가
  • M2 괄호 한정구 FIG. 3 (color online).·Figure 1 (저자명). (hard 구분자 + 대문자/color online 가드)
  • 문자접두 대문자 case-sensitive — 복수형 Figures 2.0 오탐 차단, OCR 로마 유령 부수 해소
  • soft 문서 게이트 hard 카운트에서 보충/부록 계열 제외

엔진 게이트: gate sCritical 0.801 → 0.9106 (+10.96pp), critical 118 → 53 (해소 49·신규 1·회귀 0), 앵커 무악화.

벤더링 검증

  • src/core/fig-extract.js: byte-identical (md5 05753502…, diff 0)
  • docs/fig-extract-integration.md: §주의사항에 v2.11.0 항목 추가
  • fig-engine.ts·fig-extract.d.ts 무변경 — 계약 무변경(출력 필드·좌표계·(num,page)·manifest 스키마 불변, num에 점형이 더 자주 등장할 뿐)
  • ✅ typecheck 통과 · ✅ build 통과 · ✅ [사람] 스모크 정상

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 새 기능

    • 보충·부록 캡션 표기를 확대 지원합니다.
    • S.1, A.1 형식으로 캡션 번호를 일관되게 표시합니다.
    • color online 등 조건부 괄호 표기가 포함된 캡션을 인식합니다.
    • 표 캡션에도 동일한 번호 인식 규칙을 적용합니다.
  • 문서

    • 지원되는 캡션 문법과 번호 출력 형식을 안내합니다.
    • 중첩 라벨이 있는 문서에서 동일한 figure가 중복 표시될 수 있다는 제한 사항을 추가했습니다.

캡션 문법 확장 (M1 문자접두 inline·M2 괄호 한정구) [계약 무변경].
- src/core/fig-extract.js: v2.10.2 → v2.11.0 byte-identical 벤더링 (md5 05753502…)
- docs/fig-extract-integration.md: §주의사항에 v2.11.0 캡션 문법 확대 항목 추가

계약 무변경이라 fig-engine.ts·fig-extract.d.ts 수정 불요. 출력 필드·좌표계·
(num,page)·manifest 스키마 불변 (num에 S.N·A.N 점형이 더 자주 등장할 뿐).
typecheck·build 통과.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@onetwothr1
onetwothr1 requested a review from enu3379 as a code owner July 23, 2026 11:36
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

fig-extract 엔진을 v2.11.0으로 갱신하고, 보충·부록 캡션과 괄호 한정 표기의 인식 및 번호 정규화를 확장했다. 스티치 앵커 정규화와 soft 캡션 승격용 hard 카운트 계산도 변경했으며 관련 문서를 갱신했다.

Changes

캡션 및 앵커 처리 확장

Layer / File(s) Summary
캡션 인식 및 번호 정규화
src/core/fig-extract.js, docs/fig-extract-integration.md
엔진 버전을 v2.11.0으로 갱신하고 보충·부록 번호, 괄호 한정구, table 캡션 규칙을 확장했다. 캡션 번호는 점형 canonical 형식으로 정규화되며 관련 주의사항이 문서에 추가됐다.
앵커 정규화 및 soft 게이트
src/core/fig-extract.js
스티치로 생성되는 앵커 번호에 동일한 정규화를 적용하고, S/ED/A~D 계열을 제외해 soft 승격용 hardCount를 계산한다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CaptionText
  participant matchCaption
  participant normNum
  participant StitchAnchor
  participant SoftGate
  CaptionText->>matchCaption: 확장 캡션 표기 전달
  matchCaption->>normNum: 번호 정규화 요청
  normNum-->>matchCaption: canonical 번호 반환
  matchCaption->>StitchAnchor: 캡션 앵커 생성 정보 전달
  StitchAnchor->>normNum: 스티치 번호 정규화
  StitchAnchor->>SoftGate: 앵커 목록 전달
  SoftGate-->>StitchAnchor: 계열 번호를 제외한 hardCount 계산
Loading

Possibly related PRs

  • enu3379/PDFViewer#24: 동일한 캡션 번호 인식과 VERSION 갱신 영역을 수정한다.
  • enu3379/PDFViewer#26: 캡션 앵커 복원 및 선택 로직의 같은 처리 경로를 변경한다.
  • enu3379/PDFViewer#27: 캡션 번호 인식과 soft·hard 앵커 승격 로직을 함께 수정한다.

Suggested reviewers: enu3379

Poem

당근처럼 번호가 또렷해졌네,
S.1도 A.1도 길을 찾네.
괄호 속 문구 살펴보고,
앵커는 점으로 가지런히.
토끼도 폴짝, v2.11.0!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 fig-extract를 v2.11.0으로 올리는 핵심 변경을 간결하게 잘 요약합니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 79.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-fig-extract-2.11.0

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)
src/core/fig-extract.js

ast-grep timed out on this file


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/core/fig-extract.js`:
- Around line 241-243: Update m2ParenOk to stop treating any parenthesized text
beginning with an uppercase letter as a valid hard anchor; retain the known
“colour online”/“online” cases, and only allow author-like text when additional
caption-context validation excludes references such as “Smith et al., 2024” or
“See Methods.”
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 152f2dc8-03a5-4651-9caa-25efc65f6ade

📥 Commits

Reviewing files that changed from the base of the PR and between e60c15e and 576109b.

📒 Files selected for processing (2)
  • docs/fig-extract-integration.md
  • src/core/fig-extract.js

Comment thread src/core/fig-extract.js
Comment on lines +241 to +243
function m2ParenOk(p) {
const t = p.trim();
return /^[A-Z]/.test(t) || /^colou?r\s*online$|^online$/i.test(t);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

대문자 시작만으로는 본문 참조를 캡션과 구분할 수 없습니다.

Fig. 2 (Smith et al., 2024). 또는 Figure 3 (See Methods).는 이 조건을 통과해 hard 앵커가 됩니다. 가짜 앵커는 잘못된 figure 후보를 만들고 실제 figure의 otherCaps 경계를 조기에 끊을 수 있습니다. 알려진 한정구만 허용하거나, 저자명 허용에는 추가적인 캡션 문맥 판별을 적용하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/fig-extract.js` around lines 241 - 243, Update m2ParenOk to stop
treating any parenthesized text beginning with an uppercase letter as a valid
hard anchor; retain the known “colour online”/“online” cases, and only allow
author-like text when additional caption-context validation excludes references
such as “Smith et al., 2024” or “See Methods.”

@onetwothr1
onetwothr1 merged commit 947dda6 into dev Jul 23, 2026
3 checks passed
@onetwothr1
onetwothr1 deleted the chore/bump-fig-extract-2.11.0 branch July 23, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant