Two changes that reduce false needsOcr rejections without hurting quality: 1. Per-region GID check instead of per-page blanket rejection. Previously, if ANY font on the page used GID-encoded glyphs (common in logos, decorative fonts), ALL table and text regions on that page were forced to GPU OCR via needsOcr=true. Now the page-level bail is removed; per-region text quality checks (is_garbage_text, is_cid_garbage, detect_encoding_issues) catch actual GID corruption in the extracted content. Tables whose text is clean pass through even if an unrelated font elsewhere on the page is GID-encoded. 2. Relaxed looks_like_partial_table for layout-assisted extraction. When the layout model already identified a region as a table (i.e., extract_tables_in_regions_mem), boundary-detection heuristics are less necessary — we're not guessing "is this a table?" anymore, only "can we extract it correctly?". Relaxations: - Numeric first header cell accepted (e.g., year "2024") - 1 empty header cell allowed in 3+ column tables (merged headers) - Sparse first data row threshold relaxed from 33% to 50% Paragraph detection and duplicate-header checks remain strict. Eval: 196/196 pass (full regression suite), 91/91 Rust tests pass including 7 new layout-assisted validation tests. Zero regressions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
51 lines
1.1 KiB
JSON
51 lines
1.1 KiB
JSON
{
|
|
"name": "firecrawl-pdf-inspector",
|
|
"version": "0.4.3",
|
|
"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",
|
|
"license": "MIT",
|
|
"keywords": [
|
|
"pdf",
|
|
"pdf-extraction",
|
|
"pdf-parser",
|
|
"text-extraction",
|
|
"ocr",
|
|
"pdf-classification",
|
|
"napi",
|
|
"rust",
|
|
"firecrawl"
|
|
],
|
|
"files": [
|
|
"index.js",
|
|
"index.d.ts",
|
|
"*.node",
|
|
"README.md"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/firecrawl/pdf-inspector"
|
|
},
|
|
"homepage": "https://github.com/firecrawl/pdf-inspector",
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"napi": {
|
|
"binaryName": "pdf-inspector",
|
|
"targets": [
|
|
"x86_64-unknown-linux-gnu",
|
|
"aarch64-apple-darwin"
|
|
],
|
|
"package": {
|
|
"name": "@firecrawl/pdf-inspector-js"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "napi build --platform --release",
|
|
"build:debug": "napi build --platform"
|
|
},
|
|
"devDependencies": {
|
|
"@napi-rs/cli": "^3.4.1"
|
|
}
|
|
}
|