fix: simplify region text extraction to trust layout model ordering
When fire-pdf sends pre-segmented bboxes from the layout model, pdf-inspector no longer runs column detection, stream-order heuristics, or newspaper/tabular mode detection within the region. These heuristics conflict with the layout model's decisions and cause wrong reading order. Region extraction now simply: Y-sorts items, groups into lines, and sorts within each line by X position. The heavy heuristics remain available for standalone full-page extraction. Eval showed pure OCR (0.2875 NED) beating native+heuristics (0.2916) across all categories, especially multi-column (-0.08) and newspaper (-0.16). This change should close that gap. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
0db9863919
commit
6a9ff170dc
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "firecrawl-pdf-inspector",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"description": "Fast PDF classification and text extraction. Detect text-based vs scanned PDFs, extract text by region with quality checks. Native Rust performance via napi-rs.",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user