Drop in a clinical trial protocol. It finds the Schedule of Activities, and any sub-schedule printed alongside it, wherever they sit and whatever the sponsor called them, and rebuilds each grid verbatim with footnotes bound to the cells they modify.
A schedule is a ruled table, and the rules are in the PDF as vector paths. The columns are the vertical lines. That turns inference into measurement.
No page number is given. Every page is scored on evidence a schedule is printed there: marks stacking at one x, study period words, footnote definitions underneath. Adjacent pages that score become one table, so a schedule running across four pages is not four fragments.
Columns are the vertical rules, rows the horizontal ones. Both readings are built, the drawn one and the inferred one, and the drawn grid is used only if it accounts for every mark the other found. A better structure that loses a mark has made the output worse.
3X/week, (X), Xa, 12/ Term are stored as
printed. A shaded cell with no character does not become an X. Footnote markers sit beside a
value, never inside it, so each one can point at the cell it qualifies.
The reading is scored against itself. Where the checks distrust it, and only there, the same words go to Claude for a second opinion, and every value that comes back is checked against the page. Anything still unresolved is written down rather than quietly decided.
The extractor, the confidence checks, the audit that rebuilds each page from its own ruled lines and diffs it against the output, and the committed result for all five protocols.
View on GitHub →