Files
pdf-inspector/Cargo.toml
T
Abimael MartellandClaude Opus 4.6 56cfd895b5 fix(tables): Prevent paragraph text from being falsely detected as tables
Add pairwise cross-row column alignment check to find_table_regions_strict().
Real tables have fixed column X positions that repeat across rows (score ~1.0),
while paragraph text has varying word positions (score ~0.3-0.4). Regions with
average pairwise alignment score < 0.5 are now rejected.

Also remove the num_cols >= 5 content-check bypass for BodyFont mode, requiring
body-font tables to always have ≥30% data-like cell content.

Fixes false table detection across 9+ PDFs including AI_Cultural_Collections
(-730 false lines), 131212888 (-740), Data-Processing-Agreement (-108),
CEP_DN_Interest_Rates (-93). No regressions on legitimate tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:10:10 -08:00

48 lines
809 B
TOML

[package]
name = "pdf-inspector"
version = "0.1.0"
edition = "2021"
authors = ["Firecrawl Team"]
description = "Fast PDF inspection, classification, and text extraction with smart scanned vs text-based detection"
license = "MIT"
repository = "https://github.com/firecrawl/pdf-inspector"
[dependencies]
# PDF parsing
lopdf = { git = "https://github.com/J-F-Liu/lopdf", features = ["rayon"] }
# Compression
flate2 = "1.0"
# Error handling
thiserror = "2.0"
# Parallel processing
rayon = "1.10"
# Logging
log = "0.4"
# Text processing
regex = "1.10"
once_cell = "1.19"
[dev-dependencies]
tempfile = "3.3"
[features]
default = []
[[bin]]
name = "pdf2md"
path = "src/bin/pdf2md.rs"
[[bin]]
name = "detect-pdf"
path = "src/bin/detect_pdf.rs"
[[bin]]
name = "debug_ygaps"
path = "src/bin/debug_ygaps.rs"