From 70abd1b2ccb40055a853a48102504adb222e882d Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 11 Oct 2026 20:24:13 +0200 Subject: [PATCH] The grids the text lines up into: extract-tables and pdf-to-csv parity 73.7% (84/114), pasted from the tool's own output and not arithmetic. Both tools are the same detector, which is an inference: a page holds text put at places, and a table is what a reader sees when those places line up. BentoPDF's own two pages are the same thing twice as well -- extract-tables writes one file per table, pdf-to-csv writes all of them into one -- and `pdfops tables` does both, with -to and without. Written down in the table, because it bounds the claim: ruled lines are NOT read. That is the strategy PyMuPDF's find_tables uses by default and falls back FROM, so a table held apart by rules rather than by whitespace is not found. The claim is for the text strategy alone. Co-Authored-By: Claude Opus 5 --- README.md | 6 +++--- parity/table.go | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 756271e..65d0a63 100644 --- a/README.md +++ b/README.md @@ -766,9 +766,9 @@ bentoparity -tools ~/src/bentopdf/docs/tools -pdfops ./pdfops -src ~/src/go-pdfk ``` ``` -covered 82 -not covered 32 -parity 71.9% (82/114), every claim verified +covered 84 +not covered 30 +parity 73.7% (84/114), every claim verified ``` ⛔ **It refuses to report a figure if a single claim cannot be checked.** A diff --git a/parity/table.go b/parity/table.go index 161cc9f..429a344 100644 --- a/parity/table.go +++ b/parity/table.go @@ -62,6 +62,19 @@ var BentoPDF = []Claim{ // --- what comes OUT of a PDF ------------------------------------------- {Tool: "pdf-to-text", Claim: "verb:text"}, + // ⛔ Both of these are the SAME detector, and it is an inference: a page + // holds text put at places, and a table is what a reader sees when those + // places line up. BentoPDF's own two pages are the same thing twice as + // well — extract-tables writes one file per table, pdf-to-csv writes all + // of them into one — and `pdfops tables` does both, with -to and without. + // + // What it does NOT do is read ruled lines, which is the strategy + // PyMuPDF's find_tables uses by DEFAULT and falls back from. So a table + // held apart by rules rather than by whitespace is not found, and the + // claim is for the text strategy alone. Said in extract's README under + // "What it still gets wrong", and in ops's beside the verb. + {Tool: "extract-tables", Claim: "verb:tables"}, + {Tool: "pdf-to-csv", Claim: "verb:tables"}, {Tool: "extract-images", Claim: "verb:images"}, {Tool: "extract-attachments", Claim: "verb:detach"}, {Tool: "add-attachments", Claim: "verb:attach"},