Skip to content

텍스트 누락 수정 (최신 docling, layout model, postprocess 적용)#144

Merged
mestanam-mnc merged 1 commit intodevelopfrom
bug/143-text-missing
Jan 7, 2026
Merged

텍스트 누락 수정 (최신 docling, layout model, postprocess 적용)#144
mestanam-mnc merged 1 commit intodevelopfrom
bug/143-text-missing

Conversation

@inoray
Copy link
Collaborator

@inoray inoray commented Jan 7, 2026

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

@inoray inoray linked an issue Jan 7, 2026 that may be closed by this pull request
@gemini-code-assist
Copy link

Summary of Changes

Hello @inoray, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 풀 리퀘스트는 레이아웃 처리 파이프라인의 유연성과 제어력을 향상시키는 데 중점을 둡니다. 새로운 기본 레이아웃 옵션과 모델 추상화 계층을 도입하여, 텍스트 셀이 클러스터에 할당되는 방식과 빈 클러스터의 유지 여부를 더 세밀하게 제어할 수 있게 합니다. 이는 특히 VLM(Visual Language Model) 전용 처리와 같은 특정 시나리오에서 유용할 것입니다.

Highlights

  • 레이아웃 옵션 확장: LayoutOptions 클래스가 이제 BaseLayoutOptions를 상속하며, keep_empty_clustersskip_cell_assignment와 같은 새로운 옵션이 추가되어 레이아웃 모델의 유연성이 향상되었습니다.
  • 레이아웃 모델 추상화: 새로운 파일 base_layout_model.py가 추가되어 레이아웃 모델을 위한 추상 기본 클래스 BaseLayoutModel을 정의합니다. 이는 모델 아키텍처의 구조화 및 확장성을 높입니다.
  • 레이아웃 후처리 로직 개선: layout_postprocessor.py 파일에서 셀 할당 및 빈 클러스터 처리 로직이 skip_cell_assignmentkeep_empty_clusters 옵션에 따라 조건부로 실행되도록 변경되었습니다. 또한, Python 내장 타입 힌트가 사용되도록 업데이트되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 VLM 전용 처리를 위한 새로운 옵션을 도입하고, 텍스트 누락 문제를 해결하기 위해 레이아웃 후처리 로직을 개선하는 등 여러 중요한 변경 사항을 포함하고 있습니다. 전반적으로 코드 품질이 향상되었으며, 특히 pipeline_options 리팩토링과 layout_postprocessor의 조건부 로직 추가는 코드의 유연성과 유지보수성을 높이는 좋은 변화입니다. 한 가지 제안 사항으로, 새로 추가된 BaseLayoutModel의 안정성을 높이기 위해 predict_layout 메서드의 반환 값 길이를 확인하는 단언문을 추가하는 것을 권장합니다. 이를 통해 예기치 않은 동작을 방지하고 디버깅을 용이하게 할 수 있습니다.

Comment on lines +35 to +36
predictions = self.predict_layout(conv_res, pages)

Choose a reason for hiding this comment

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

medium

predict_layout 메서드는 입력된 페이지 수와 동일한 수의 예측 결과를 반환해야 합니다. 만약 predict_layout이 페이지 수와 다른 수의 예측을 반환하면 zip 함수가 조용히 결과를 누락시켜 찾기 어려운 버그를 유발할 수 있습니다. 페이지 수와 예측 결과 수가 같은지 확인하는 단언문(assertion)을 추가하여 이와 같은 상황을 방지하고 코드를 더 견고하게 만드는 것이 좋습니다.

        predictions = self.predict_layout(conv_res, pages)
        assert len(pages) == len(predictions), "The number of predictions must match the number of pages."

@mestanam-mnc mestanam-mnc merged commit afbb02f into develop Jan 7, 2026
2 checks passed
@inoray inoray deleted the bug/143-text-missing branch January 7, 2026 06:43
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.

일부 텍스트 누락

2 participants