verify_quote
Prove a candidate quotation exists verbatim in a source PDF, returning a graded match verdict with page offsets and file hash to block altered quotes before publication.
Instructions
Prove that a candidate quotation is really in a source PDF, before it is published as verbatim.
Call this on EVERY quotation destined for a Quote-with-comment nanopub. You choose which sentence carries the paper's claim — that is judgement. This decides whether the sentence is admissible, and that is not: it is a string search, and anyone can re-run it and get the same answer.
Returns a graded verdict with the page, character offsets and the file's SHA-256 as evidence:
exact byte-identical to the extracted page text normalized matched after whitespace / ligature / typographic punctuation / line-break-hyphen repair extraction_tolerant additionally ignored hyphens and punctuation spacing not_found NOT in this PDF — do not publish it as a quotation
A tier below exact is normal and not a warning about your quotation: PDF
extraction inserts line breaks and drops hyphens (a real published FORRT
quotation matches only at extraction_tolerant, because pypdf reads
"35-year" as "35year"). Every tier canonicalises formatting only — never
words, digits or order — so an altered number still fails at every tier.
Read matched_text before publishing.
On not_found, closest.text_in_pdf shows what the paper says where it
nearly matched. A one-digit change scores ~0.91 similarity and is still
not_found: high similarity is not a pass.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_path | Yes | ||
| quotation | Yes |