docling-project / docling-project/docling
Issue with Extracting Tables with Merged Rows
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
Hello,
I’m encountering an issue when extracting tables containing merged rows. Specifically, when a cell spans multiple rows, the expected behavior is to assign it a `row_span` value greater than 1. However, in many cases, the extraction process fails to identify the correct `row_span` value, often assigning a lower value than the actual span. This results in blank cells appearing in the subsequent rows rather than merging as intended.
To address this, I tested with both `do_cell_matching=True` and `do_cell_matching=False` settings, and tried using both the `DoclingParseDocumentBackend` and `DoclingParseV2DocumentBackend` options. Unfortunately, neither approach yielded the correct `row_span` values or resolved the merging issue.
Attached are the following files for reference:
- Sample PDF document with merged rows
- Extracted output demonstrating the issue
- Expected output showing the correct `row_span` values and row merges that Docling was unable to achieve
**Attachments**
[sample.pdf](https://github.com/user-attachments/files/17607847/sample.pdf)
[extraction_output.csv](https://github.com/user-attachments/files/17607848/extraction_output.csv)
[expected_output.csv](https://github.com/user-attachments/files/17607840/expected_output.csv)
Thank you very much for your efforts on this project.
Contributor guide
Assessment
This issue has not been assessed yet.