Repository navigation
fix: 병합 셀 캡션 탐색을 표 첫 행으로 한정 Fixes #34 - #39
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
표 둘째 행 이하의 colspan 셀도 캡션으로 채택(confidence=inferred).
제출 기능명세서 소분류는 "표 첫 행 병합 셀 안의 캡션 탐색"이고, 코드의 docstring도 첫 행을 명시하고 있어 명세·문서·구현이 셋 다 어긋난 상태였음
재현:
tests/specification/test_spec_layout.py::test_qa15_caption_must_be_in_first_row영향
이 fallback은 1~3단계(direct / 같은 페이지 bbox / 인접 페이지)가 모두 실패했을 때만 타므로 멀쩡한 캡션을 가로채지는 않는다. 대신 캡션 없는 표에 가짜 캡션을 단다.
caption_text는 EU의 정체성이라 text·retrieval_text·retrieval_units의 prefix, table_abstract에 모두 복제되고, 분할되면 모든 조각에 반복된다. 또한 confidence가 none이 아닌 inferred로 기록돼 다운스트림에서 거를 수단이 사라진다.
변경
<tr>로 한정 (_FIRST_ROW_PATTERN)caption.py를 의존성 없는 모듈로 유지 (bs4는 split.py 전용)검증
tests/test_caption_merged_header.py(신규 9건)tests/specification/test_spec_layout.pyFixes #34
부수 변경
PR을 올린 뒤 CI가 두 가지 이유로 실패해 같은 브랜치에서 함께 처리
test잡: dev extra에langchain-core가 없어 QA-40·41·44가 CI에서만 ImportError로 실패pip-audit잡: pip 자체 취약점 2건은 러너 pip 업그레이드로 해소. pillow 12.3.x 24건은 docling 계열의pillow<13.0.0상한 때문에 올릴 수 없어 사유를 기록하고 개별 ID로 제외spec_gap마커 3개도 제거