Skip to content

chore: bump fig-extract to v2.9.3 - #27

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

chore: bump fig-extract to v2.9.3#27
onetwothr1 merged 1 commit into
devfrom
chore/bump-fig-extract-2.9.3

Conversation

@onetwothr1

@onetwothr1 onetwothr1 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

엔진 repo(figure-preview-test)의 v2.9.0~v2.9.3을 벤더링합니다.

계약 영향: 없음

네 릴리스 모두 [계약 무변경]입니다. 출력 필드·좌표계·(num, page) 식별 키·공개 export가 전부 불변이라 fig-engine.ts·fig-extract.d.ts는 수정하지 않았습니다. Margin 쪽 코드 변경도 없습니다.

src/core/fig-extract.js는 엔진 repo 원본과 byte-identical입니다 (md5 c4a809a9b98190243001aa85452988e6).

엔진 변경 요약

체인지로그 정본은 엔진 repo의 fig-extract.js 헤더입니다.

버전 내용
v2.9.0 서브패널 라벨 stopper 면제 — figure 내부 (a) … 서브캡션이 본문으로 오인돼 후보가 전멸하고 figure가 통째로 사라지던 문제
v2.9.1 soft 캡션 앵커 + 문서 수준 게이트 — 번호 뒤 구분자가 없는 표기(RSC·Springer Fig. 1 본문…, Wiley 자간 분리 F I G U R E 1 본문…) 지원
v2.9.2 임베디드 캡션 앵커 — 나란한 figure의 캡션이 8pt 미만 간격으로 한 줄에 병합된 경우 분해
v2.9.3 줄끝 종결형 가드에서 접두어 길이 제외Extended Data Fig. 1 미인식 수정

사용자 체감

지금까지 감지 0개로 나오던 논문들이 잡힙니다. 특히 RSC·Springer·Wiley 계열에서 문서 전체가 통째로 미탐지되던 케이스가 해소됐습니다 (예: 8개 figure 논문이 0개 → 8개).

엔진 repo 검증

  • 게이트: 네 릴리스 전부 critical 회귀 0 · 신규 0
  • gate sCritical 0.7781 → 0.8503, 미탐지 59 → 31건
  • 코퍼스 116편 전수 스냅샷 diff에서 각 릴리스마다 변경은 표적 논문으로 한정됨(나머지 111~115편 물리 무변경)
  • 앵커 13 → 20편 승격

알려진 한계 (문서에 추가)

번호 글리프에 ToUnicode 매핑이 없는 PDF(Wiley 일부)는 원리상 미탐지입니다. 번호가 화면에는 정상으로 보이는데 텍스트 레이어에 문자가 없어서, 사용자에겐 "번호가 멀쩡히 보이는데 안 잡힌다"로 보입니다. 문의가 오면 수동 크롭 안내가 맞습니다. docs/fig-extract-integration.md에 적어뒀습니다.

검증

  • byte-identical diff 0건
  • npm run typecheck 통과
  • npm run build 통과
  • 스모크 — 그림·표 탭 스캔·프리뷰 정상

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 개선 사항

    • 다양한 캡션 형식과 접두어를 더 안정적으로 인식합니다.
    • 한 줄에 결합된 여러 캡션과 서브패널 캡션을 올바르게 분리해 추출합니다.
    • 번호 구분자가 없는 캡션도 문서 구조에 따라 인식할 수 있습니다.
    • 캡션 주변 콘텐츠가 잘못 제외되거나 중단되는 문제를 줄였습니다.
  • 문서

    • 캡션 및 번호 인식의 제한 사항과 동작 조건을 최신화했습니다.

엔진 repo(figure-preview-test)의 v2.9.0~v2.9.3을 벤더링. 네 릴리스 모두 [계약 무변경]—
출력 필드·좌표계·(num,page) 식별 키·공개 export 전부 불변이라 fig-engine.ts·fig-extract.d.ts는
수정이 필요 없다. src/core/fig-extract.js는 엔진 repo 원본과 byte-identical(md5 c4a809a9…).

엔진 변경 요약 (상세는 엔진 repo의 fig-extract.js 헤더 체인지로그가 정본):
- v2.9.0 서브패널 라벨 stopper 면제 — figure 내부 "(a) …" 서브캡션이 본문으로 오인돼
  후보가 전멸하고 figure가 통째로 사라지던 문제
- v2.9.1 soft 캡션 앵커 + 문서 수준 게이트 — 번호 뒤 구분자가 없는 표기
  (RSC·Springer "Fig. 1 본문…", Wiley 자간 분리 "F I G U R E 1 본문…") 지원
- v2.9.2 임베디드 캡션 앵커 — 나란한 figure의 캡션이 한 줄로 병합된 경우 분해
- v2.9.3 줄끝 종결형 가드에서 접두어 길이 제외 — "Extended Data Fig. 1" 미인식 수정

엔진 repo 게이트: 네 릴리스 전부 critical 회귀 0·신규 0.
gate sCritical 0.7781 -> 0.8503, 미탐지 59 -> 31건.

docs/fig-extract-integration.md: v2.9.x 캡션 표기 확대 범위와, 번호 글리프에 ToUnicode
매핑이 없는 PDF는 원리상 미탐지라는 점(사용자에겐 "번호가 보이는데 안 잡힘"으로 보임)을 추가.

검증: byte-identical diff 0건 · npm run typecheck 통과 · npm run build 통과 · [사람] 스모크 정상

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79dbb49f-6eb6-4eea-bf2c-a9e5f6817f30

📥 Commits

Reviewing files that changed from the base of the PR and between 5d23091 and 8cf01ba.

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

📝 Walkthrough

Walkthrough

캡션 접두어 길이 계산, 소프트 앵커 승격, 임베디드 캡션 분해, 서브패널 stopper 예외 처리가 fig-extract 엔진에 추가되었으며, 문서와 버전이 v2.9.3 기준으로 갱신되었다.

Changes

캡션 앵커 엔진 업데이트

Layer / File(s) Summary
캡션 매칭 및 후보 판별
src/core/fig-extract.js, docs/fig-extract-integration.md
캡션 접두어 길이를 매칭 결과와 길이 가드에 반영하고, 구분자 없는 소프트 캡션 후보 및 문서 단위 승격 조건을 추가했다. 관련 주의사항 문서와 엔진 버전을 갱신했다.
임베디드 캡션 분해
src/core/fig-extract.js
같은 물리 라인에 결합된 여러 캡션 조각을 형제 앵커로 분리하고 embedded, sibL, sibR 메타데이터와 확장 경계를 반영했다.
소프트 앵커 문서 승격
src/core/fig-extract.js
hard 앵커 수와 라벨폼 반복 횟수 조건을 문서 단위로 평가한 뒤 소프트 후보를 anchors와 관련 상태에 반영하도록 extract 흐름을 변경했다.
서브패널 stopper 통합
src/core/fig-extract.js
(a)/(b) 형식의 연속 서브패널 라벨을 식별하고, 조건을 만족하는 캡션 직전 블록에서 BODY stop을 면제하는 경로를 추가했다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant extract
  participant captionAnchors
  participant promoteSoftAnchors
  participant detectPage
  extract->>captionAnchors: 페이지 라인에서 hard 및 soft 캡션 후보 생성
  captionAnchors-->>extract: 페이지별 앵커와 후보 반환
  extract->>promoteSoftAnchors: 문서 전체 pageData 전달
  promoteSoftAnchors-->>extract: 승격된 anchors 재구성
  extract->>detectPage: 페이지 데이터와 서브패널 stopper 전달
  detectPage-->>extract: 캡션 영역과 BODY stop 결과 반환
Loading

Possibly related PRs

  • enu3379/PDFViewer#2: 동일한 fig-extract.js 엔진 영역에 fig-extract 버전 변경을 적용했다.
  • enu3379/PDFViewer#24: 캡션 번호·라벨 정규식과 엔진 버전을 함께 수정했다.
  • enu3379/PDFViewer#26: captionAnchorsdetectPage의 캡션 앵커 처리 흐름을 수정했다.

Suggested reviewers: enu3379

Poem

당근 들고 토끼가 뛰네
캡션 앵커 줄을 세우네
소프트 라벨 살짝 승격
서브패널 stop은 면제
임베디드 형제도 반짝
v2.9.3, 깡충 완료!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 79.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR의 핵심인 vendored fig-extract 엔진을 v2.9.3으로 올린 변경을 정확히 요약합니다.
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.9.3

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.

@onetwothr1
onetwothr1 merged commit 82721c0 into dev Jul 21, 2026
3 checks passed
@onetwothr1
onetwothr1 deleted the chore/bump-fig-extract-2.9.3 branch July 21, 2026 15:20
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