ragflow/deepdoc/parser
少卿 8a285d1230 feat(mineru): implement smart crop with page-width fallback and native image mixing
- Changed fallback image generation to page-width strips (full horizontal, bbox vertical)
- Implemented smart crop() with native+fallback mixing and deduplication
- Added thresholds: max 10 images, total height <2000px
- Established native_img_map for table/image/equation priority
- Removed 120px padding logic that caused super-long stitched thumbnails

This fixes the issue where chunk thumbnails were either missing or excessively long due to:
1. MinerU not providing images for pure text blocks
2. Official crop() adding 120px padding and stitching across pages
3. Manual.py merging multiple sections into one chunk

The new approach:
- Priority 1: Use MinerU's native high-quality images (tables/equations)
- Priority 2: Use page-width fallback strips (consistent width for stitching)
- Priority 3: Use full page as last resort
- Deduplicates identical bboxes during stitching
- Limits output to reasonable dimensions for UX
2025-12-10 21:26:25 +08:00
..
resume Fix: resolve regex library warnings (#7782) 2025-05-22 10:06:28 +08:00
__init__.py Feat: advanced markdown parsing (#9607) 2025-08-21 09:36:18 +08:00
docling_parser.py Feat: add more chunking method (#11413) 2025-11-20 19:07:17 +08:00
docx_parser.py Refactor parser code (#9042) 2025-07-25 12:04:07 +08:00
excel_parser.py Fix: chunk method error. (#11807) 2025-12-08 14:28:23 +08:00
figure_parser.py Fix: none type error. (#11735) 2025-12-04 14:14:38 +08:00
html_parser.py Fix errors (#11795) 2025-12-08 09:42:10 +08:00
json_parser.py Feat: parsing supports jsonl or ldjson format (#9087) 2025-07-30 09:48:20 +08:00
markdown_parser.py Fix: incorrect image merging for naive markdown parser (#11520) 2025-11-25 19:54:06 +08:00
mineru_parser.py feat(mineru): implement smart crop with page-width fallback and native image mixing 2025-12-10 21:26:25 +08:00
pdf_parser.py Refa:replace trio with asyncio (#11831) 2025-12-09 19:23:14 +08:00
ppt_parser.py fix "TypeError: '<' not supported between instances of 'Emu' and 'Non… (#9209) 2025-08-04 16:07:03 +08:00
tcadp_parser.py Feat: Add TCADP parser for PPTX and spreadsheet document types. (#11041) 2025-11-20 10:08:42 +08:00
txt_parser.py Move token related functions to common (#10942) 2025-11-03 08:50:05 +08:00
utils.py