Repository navigation
Conversation
|
✅ DCO Check Passed Thanks @Yi-111-a, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit This pull request updates CI safety: no concern found. A maintainer must still approve CI. Possible duplicates
The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at 8523cc67a3. It read the code and did not run it.
No blocking defect found. The new loop in _collect_annotation_content stops at the next annotation or the first blank line after content. That keeps the old boundaries for tables, captions and figures. The three DeepSeek reference sources in tests/data/md_deepseek/sources put each block's content on one line before a blank line, so their output does not change.
A maintainer makes the merge decision. This review never approves the pull request.
_collect_annotation_content stopped after the first non-empty line for labels other than tables and pictures, so a multi-line text/title block lost every line after the first one. Unlimited OCR delegates to the same collector after normalizing its markers, so it lost the same lines. Now every non-table block collects consecutive non-empty lines until the next annotation or the first blank line, so all content in the first block survives until the next annotation. Empty lines, following annotations, captions, and table markup keep their boundaries. Fixes docling-project#4905 Signed-off-by: Yi-111-a <153097222+Yi-111-a@users.noreply.github.com>
|
DCO check fixed: the single commit now carries the |
8523cc6 to
1f6aacf
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
_collect_annotation_contentstopped after the first non-empty line for any label other than tables and pictures. A DeepSeek-OCR response likeproduced
First lineandNext blockas text items and silently droppedSecond line. Unlimited-OCR delegates to the same collector after normalizing its<|det|>..markers, so it lost the same lines.The collector now gathers the block's consecutive non-empty lines until the next annotation or the first blank line. Empty lines, following annotations, captions, and table markup keep their boundaries, so caption linkage and table parsing are unchanged; figure/image/table blocks are handled by their existing branches. This fixes both parsers.
Closes #4905
Testing
tests/test_unlimited_ocr_markdown.pypinning the issue's reproduction for both response shapes: continuation lines survive, and an annotation line / blank line still ends a block.uv run pytest -q tests/test_unlimited_ocr_markdown.py: 9 passed.tests/test_deepseekocr_vlm.pycannot be collected locally (it imports the full VLM pipeline stack, which needs the models extra); its reference-data paths are untouched by this change.