Repository navigation
Conversation
_split_table_by_columns rebuilds Markdown sub-tables, but segment() sent any oversized table to it, whatever the table serializer. For triplet text from the default serializer, or HTML, get_header_and_body_lines finds no Markdown header, so every chunk got a made-up "| - |" separator, the text was wrapped in "| ... |" rows, and the last chunk could be just pipes. The column split now runs only when the header includes a Markdown separator row. Other tables use the line-based split again, as they did before docling-project#690. Fixes docling-project#931 Signed-off-by: Ritankar Mondal <[email protected]>
|
✅ DCO Check Passed Thanks @CyberRik, all your commits are properly signed off. 🎉 |
Merge Protections🔴 1 of 2 protections blocking · waiting on 👀 reviews
🔴 Require two reviewer for test updatesWaiting for
This rule is failing.When test data is updated, we require two reviewers
Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit The PR limits the column split in Topic labels added: CI safety: no concern found. A maintainer must still approve CI. 2 related pull request(s) in the same code
The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at 6f6aa9d338. It read the code and did not run it.
I found no defect. The column split now runs only when header_lines has a Markdown separator row. Markdown tables keep the old path, and triplet and HTML tables use LineBasedTokenChunker as they did before #690.
A maintainer makes the merge decision. This review never approves the pull request.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Fixes #931.
segment()sends any oversized table to_split_table_by_columns(from #690), which rebuilds Markdown sub-tables. But the table text may not be Markdown. With the default (triplet) serializer orHTMLTableSerializer,get_header_and_body_linesfinds no Markdown header. The column split still runs, puts a made-up| - |separator in every chunk, wraps the text in| ... |rows, and can leave a chunk that is only pipes.The change: take the column split only when
header_lineshas aMARKDOWN_SEPARATOR_ROW_RErow. Other tables go back to theLineBasedTokenChunkerpath they used before #690. Markdown tables are unchanged.Before and after, for a 4-row table where one row is too wide for the header (
max_tokens=50,HTMLTableSerializer):The triplet output from #931 now has no
| - |rows and no pipes-only chunk.Not in this PR: with the default serializer, the base
get_header_and_body_linesusessplit("\n")and drops line endings, so a caption runs into the first row (…by regionregion 1, …). That behavior predates #690 (it dates from #527), so I left it alone. I can send a separate PR if you'd like it changed.