Repository navigation
Table Detection Reliability Update - 1.5.1
v1.5.1 – Table Detection Reliability Update
This patch release strengthens the stability, accuracy, and internal consistency of the table‑recognition system added in v1.5, addressing real‑world issues discovered when processing diverse PDFs. Version 1.5.1 focuses on correctness, reliability, and predictable Markdown output.
⚙️ Overview
The biggest improvements in v1.5.1 revolve around making table detection safer, stricter, and more structurally aware. While v1.5 introduced powerful table intelligence, it occasionally misclassified prose, lists, or small paragraph clusters as tables. This patch resolves those issues and makes table extraction significantly more stable.
This update also unifies table metadata handling across the transform, tables, and pipeline layers, ensuring predictable behavior and clean downstream rendering.
🧩 What’s Improved
1. Stricter Table Classification
The core detection logic was rebuilt to sharply reduce false positives:
- Stronger rejection of list‑like blocks
- Stricter code‑like signature detection
- More reliable multi‑block vertical table detection
- Requirement for consistent structural signals before classifying a block as a table
- Better filtering of tiny paragraph blocks that previously slipped through
These changes ensure only real tables are interpreted as tables.
2. Improved Grid Construction & Normalization
Table grids now handle inconsistent rows more gracefully:
- Accurate normalization of ragged rows into rectangular shapes
- Safer overflow merging into the last column
- Cleaner whitespace trimming across all cells
- Reliable detection of column counts across mixed lines
This leads to far more consistent Markdown output.
3. Vertical Multi‑Block Tables Made Reliable
The vertical‑stack detection system (where each block represents a row) now:
- Requires consistent line counts per block
- Discards blocks with list markers or code‑like density
- Pads or trims lines only when structurally necessary
This eliminates earlier cases where multi‑paragraph sequences were misinterpreted as tables.
4. Unified Table Metadata in Transform Layer
The transform stage now attaches dynamic attributes consistently:
is_tabletable_gridtable_typetable_score
This metadata is now always present when needed and never leaked into unrelated blocks. Rendering logic becomes more predictable as a result.
5. Pipeline Integration Enhancements
- Added debug_tables=True pathway to surface table‑detection diagnostics.
- More consistent mapping between detection, transformation, and rendering.
- Stronger separation of table‑paths vs normal paragraph flow.
6. Stability Fixes Across the Core Modules
Across tables.py, transform.py, and pipeline.py, this patch corrects issues where table detection:
- triggered on short paragraphs
- failed to normalize grids
- did not propagate metadata cleanly
- conflicted with math detection in certain PDFs
Each subsystem now cooperates more cleanly.
🗂 Updated Modules
The following files were modified for reliability and structural correctness:
- tables.py – rebuilt detection pipeline, improved heuristics, safer grid normalization
- transform.py – unified table annotation, improved integration with math detection
- pipeline.py – added debug pathways, improved stage handoff, safer processing
🧪 Ideal For
This patch significantly improves performance on:
- Financial reports
- Corporate data summaries
- Textbooks with side‑by‑side definitions
- Academic papers with mixed table and prose regions
- PDFs with complex block segmentation
📌 Summary
v1.5.1 is a precision‑focused patch release that makes table extraction more stable, more accurate, and far less prone to false positives. It strengthens the foundation laid in v1.5 and ensures consistently clean Markdown output for real‑world documents.
Recommended for all users – especially those converting PDFs with complex or irregular tabular structures.