Skip to content

Fix parsing of centered borderless tables - #386

Draft
ShiyuanHsu wants to merge 1 commit into
run-llama:mainfrom
ShiyuanHsu:agent/fix-centered-borderless-tables
Draft

Fix parsing of centered borderless tables#386
ShiyuanHsu wants to merge 1 commit into
run-llama:mainfrom
ShiyuanHsu:agent/fix-centered-borderless-tables

Conversation

@ShiyuanHsu

Copy link
Copy Markdown

Summary

  • Preserve borderless table regions through XY-cut when rows share stable centered column tracks.
  • Let the existing Markdown table classifier process the intact rows.
  • Add regression tests for two-row tables and protection against vertical table slicing.

Root cause

For centered cell text, varying text widths change the left edges while the column centers remain aligned. XY-cut interpreted the whitespace between those columns as page-column gutters and split one logical table into separate regions. The Markdown classifier then received column-wise text instead of complete table rows.

Validation

  • cargo test -p liteparse --no-default-features --lib centered_text_table_obstacle -- --nocapture
  • Manually verified local parsing of native-text PDF samples without OCR.

@logan-markewich

logan-markewich commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

For changes to markdown, I would recommend re-running ParseBench -- we have tracked results there so its worth checking if this impacts performance there. I can always run it too if thats too annoying. I usually just point claude code or codex at it and let it wire up a local build for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants