docling-project / docling-project/docling
[Bee] Incorrect reading order for Key Value regions
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 95
Description
### Requested feature
For some content in the PDF document, it includes multiple columns or blocks with key and value regions, and the structure is not recognized as tables; the reading order should be key first, value second, one by one, but in the markdown results, they are mixed together.
For example:
file content
result:
There are several testing documents:
1. Summary section in [test_kvp_reading_order.pdf](https://github.com/user-attachments/files/29789718/test_kvp_reading_order.pdf), programmatic PDF
2. form section in [AB.FILES.038670001-02-PDF_A_MockUp-page-5.pdf](https://github.com/user-attachments/files/29789801/AB.FILES.038670001-02-PDF_A_MockUp-page-5.pdf), Form data, scanned PDF, but the section is not recognized as table.
Contributor guide
Research direction
Start by reproducing the markdown output with test_kvp_reading_order.pdf and AB.FILES.038670001-02-PDF_A_MockUp-page-5.pdf, comparing the reported key/value regions with their expected reading order. Trace the PDF-to-markdown reading-order entry point and add or update regression coverage so each key is followed by its corresponding value in both examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100