Skip to content

feat: table-embedded images, size filter, and doc_nav top_summary - #221

Merged
EricNGOntos merged 3 commits into
mainfrom
feat/wuchengke/table-embedded-images
Jul 24, 2026
Merged

feat: table-embedded images, size filter, and doc_nav top_summary#221
EricNGOntos merged 3 commits into
mainfrom
feat/wuchengke/table-embedded-images

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • Extract MinerU/Markdown table-embedded <img> as normal image assets (rename, VLM summary, HTML src rewrite) with text/table embeds associations for retrieval.
  • Unify the 10KB IMG_MIN_SIZE gate via image_size_filter across DOCX, standalone image parse, and PDF→Markdown (including table images), discarding undersized files before rename/LLM.
  • Persist document-level top_summary on doc_nav.json and keep retrieval hydration/rendering wired for table-embedded images.

Test plan

  • make check (ruff + pyright)
  • pytest focused: test_table_embedded_images_contract, test_image_size_filter_contract, test_summary_builder
  • Reparse sample PDF (SJSYJ-MS201-2023…) and confirm logos <10KB dropped while flowchart images remain
  • Spot-check retrieval: table hit includes embedded image evidence

Made with Cursor

EricNGOntos and others added 3 commits July 21, 2026 10:43
- Introduced a new function to persist the document-level top_summary in doc_nav.json, ensuring it is saved after enrichment.
- Updated `enrich_doc_nav_summaries` to support an opt-in flag for using LLM for top_summary generation, defaulting to true.
- Refactored existing logic to prioritize loading enriched summaries from disk, improving efficiency and reducing unnecessary recomputation.
- Adjusted related tests to validate the new functionality and ensure correct behavior of top_summary persistence.

This update enhances the document navigation process by ensuring that summaries are consistently saved and retrieved, improving overall user experience.
- Updated the summary builder to improve document-level top summary generation, ensuring child contributions are deterministically summarized without LLM unless specified.
- Enhanced inline asset handling to support table-embedded images, allowing for dynamic type assignment based on image references.
- Introduced image size filtering across various document formats to skip undersized images, improving overall processing efficiency.
- Refactored markdown image asset handling to include new properties for better management of image renaming and deferred tasks.
- Improved table asset handling to include image references, ensuring that images embedded in tables are correctly processed and displayed.

These updates collectively enhance the document parsing capabilities, streamline image handling, and improve the overall user experience in document navigation and summary generation.
Co-authored-by: Cursor <cursoragent@cursor.com>
@EricNGOntos
EricNGOntos merged commit cb807d1 into main Jul 24, 2026
6 checks passed
@EricNGOntos
EricNGOntos deleted the feat/wuchengke/table-embedded-images branch July 24, 2026 13:45
EricNGOntos added a commit that referenced this pull request Jul 24, 2026
Keep test_summary_builder.py from main (#221); it was deleted on this
branch unrelated to asset probing.

Co-authored-by: Cursor <cursoragent@cursor.com>
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