API Reference
Reading documents
Name |
Signature |
Purpose |
|---|---|---|
|
|
Read a born-digital PDF into per-page text. |
|
|
Attach the page number printed in the document to each page. |
|
|
Label each page with section headings and where they sit in its text. |
|
|
Blocks of a DOCX file in body order, each with its section and number. |
|
|
Images embedded in a DOCX file, numbered in the order they appear. |
|
|
Tables in a PDF, numbered across the document, with file and printed page. |
|
|
Cell grids for every table in a PDF, DOCX, or image file, with caption and note. |
|
|
Pages and table grids from one pass over a PDF, DOCX, or image file. |
|
|
One cell grid for a |
|
|
Tables as page-like blocks, so |
|
|
Header rows above the numeric body, joined into one label per column. |
|
|
Parse a table cell into a kind (number, percent, mean_sd, n_percent, missing, empty, text) and its values. |
|
|
Split a header label from the sample size it states, such as |
Codebook and extraction
Name |
Signature |
Purpose |
|---|---|---|
|
|
Fields from a dict or a YAML file, checked and normalized. |
|
|
Codebook from the |
|
|
Codebook from a long .xlsx or .csv sheet, one row per term. |
|
|
Write a codebook as a long .xlsx or .csv sheet that |
|
|
Find reported n, mean, SD, SE, t, F, r, p, and MSE values in text, with their positions. |
|
|
One record per extracted value, rules first. |
|
|
One row per extracted value, columns in |
|
|
One row per paper, one column per field; values joined with ‘; ‘. |
|
|
Write rows to a UTF-8 CSV with a header from every key seen. |
Evidence and search
Name |
Signature |
Purpose |
|---|---|---|
|
|
Locate criterion evidence in a PDF, anchored to page and section. |
|
|
Cosine similarity of each text to a description, on the encoder’s embeddings. |
|
|
Citation anchor for a span, as the reviewer sees it. |
|
|
Find a keyword in text with surrounding context. |
|
|
Search a parsed document for keywords, anchored to printed pages. |
|
|
Render a span with the matched term in markdown bold, for notebooks and sheets. |
|
|
Join spans into one evidence string for a report column. |
|
|
Build a search pattern from plain terms, so nobody has to write a regex. |
|
|
Color the matched terms inside a workbook, in place. |
Retrieval and confidence
Name |
Signature |
Purpose |
|---|---|---|
|
|
Split text into overlapping character chunks, breaking at whitespace. |
|
|
Chunk each page separately, so every chunk keeps the page it came from. |
|
|
Embed chunks once for reuse across queries. |
|
|
Rank chunks against a query by cosine similarity. |
|
|
Answer questions about a document from retrieved passages. |
|
|
Score how well an extracted answer is grounded in its source passages. |
|
|
Band label for a grounding score. |
|
|
Whether an extraction should go to a second reviewer. |
|
|
Score a list of extractions and flag the ones needing a second reviewer. |
|
|
Counts by band and how many extractions need a second reviewer. |
License and providers
Name |
Signature |
Purpose |
|---|---|---|
|
|
Decide whether one paper may be sent to a language model. |
|
|
True when a model endpoint names a host on this machine. |
|
|
Base URL and key variable of each supported chat API. |
|
|
Read KEY=VALUE lines into the environment without overriding variables already set. |
|
|
Build |
|
|
Approximate download size in GB of local models, as listed in the Ollama library. |
|
|
Local models that read images. |
|
|
Folder where Ollama keeps models: OLLAMA_MODELS, else |
|
|
Free disk space against the download size of a local model. |
Provenance
Name |
Signature |
Purpose |
|---|---|---|
|
|
Record what a run did, so a reported result can be reconstructed. |
|
|
Record the license verdict each paper was processed under. |
|
|
Record a prompt by SHA-256 hash, with its model and a running digest. |
|
|
Record retrieval settings. |
|
|
Record the model name, type, and checkpoint. |
|
|
Record the random seed. |
|
|
Record the data file and its record counts. |
|
|
Record a decision threshold and its basis. |
|
|
Record criterion descriptions verbatim. |
|
|
Record a free note under |
|
|
Everything recorded, as a dict. |
|
|
Write the record as JSON. |
|
|
Read a provenance file written by |
|
|
Report which recorded fields differ between two runs. |
|
|
Record one coder step with coder and time (now in UTC when |
|
|
Per paper: nodes, edges, evidence, and status per field. |
|
|
Write trace graphs as JSON. |
|
|
Read a coder decisions file (confirm, correct, not_reported). |
|
|
Apply decisions as layer |
|
|
Methods text for PRISMA 2020 items 9 and 11. |
Table values
Name |
Signature |
Purpose |
|---|---|---|
|
|
Statistic roles a column can take. |
|
|
Group roles an arm can take: treatment, control, other. |
|
|
Stat role and time point of each column: rules, then a model, then |
|
|
Arm labels in the rows or the header, each with its group role. |
|
|
One record per table value, in the record format of |
Effect sizes
Name |
Signature |
Purpose |
|---|---|---|
|
|
t, F, and MSE stated in |
|
|
n records for arms named just before an ‘n = N’ in |
|
|
The total N when |
|
|
One comparison per treatment arm, outcome, and time point, paired with its control. |
|
|
Effect-size methods in order of preference. |
|
|
Hedges’ g and its variance by the first method in |
|
|
|
|
|
Column order of |
|
|
Column order of |
|
|
One flat row per effect, columns in |
|
|
Rows with |
|
|
Small-sample correction J = 1 - 3 / (4 df - 1). |
|
|
Pooled SD of two arms. |
|
|
1 + (m - 1) ICC with m = analyzed N / clusters. |
|
|
Small-number-of-clusters factor gamma and the degrees of freedom for J. |
|
|
Split a total N over arms in proportion to |
|
|
Unadjusted SD from the SE of a group mean; |
|
|
Unadjusted posttest SD from the ANCOVA error mean square; |
Image tables
Name |
Signature |
Purpose |
|---|---|---|
|
|
Tables in a PDF whose body is a picture with no text, numbered as |
|
|
PNG bytes of one page region, rendered at |
|
|
Records for values a coder typed, or confirmed from a vision read ( |
|
|
Values a vision model reads from a table image, every one left for a coder to confirm. |
Study design
Name |
Signature |
Purpose |
|---|---|---|
|
|
Designs |
|
|
Suggested design of one paper and the evidence, for the coder to confirm. |
|
|
Text from the first Method heading to Results, or all text before References. |
Correlation matrices
Name |
Signature |
Purpose |
|---|---|---|
|
|
Column order of |
|
|
Labels, square matrix, n, and location of a correlation table grid. |
|
|
Flags for a correlation matrix; nothing is repaired. |
|
|
One record per variable pair in |
|
|
Construct for each label by exact, then normalized, match; |
|
|
A suggested role and its reason for each table arm without a treatment or control group. |
|
|
The single-case design named most often in the Method text, and the evidence. |
|
|
‘decrease’ or ‘increase’ as the intervention goal of a single-case graph, and the evidence. |
|
|
‘rct’ or ‘qed’ for a group study, and the evidence, from its Method text. |
|
|
Construct names suggested from the labels of several studies, most shared first. |
|
|
A construct and its reason for each label, for a coder to confirm or change. |
|
|
Per-study CSV matrices over |
Single-case graphs
Name |
Signature |
Purpose |
|---|---|---|
|
|
Column order of |
|
|
Single-case designs |
|
|
Outcome types |
|
|
Outcome type of a single-case graph from its axis and caption words, and the evidence. |
|
|
Figures in a PDF or DOCX as |
|
|
Linear pixel-to-value map per axis from two or more |
|
|
Pixel centers |
|
|
Markers as |
|
|
Pixel x of vertical lines, solid or dashed, inked over half the axes height or more. |
|
|
Horizontal segments inside the axes, at least 15% of their width, as |
|
|
Stacked panels split at blank rows, or into |
|
|
Panels of a figure as the design reads them, in pixels of the whole figure. |
|
|
scdbayes rows from marker pixels: values, sessions, phases, and snapped outcomes. |
|
|
Rows for every panel of |
|
|
Write graph rows to a CSV whose case, session, and phase columns scdbayes detects. |
Other figures
Name |
Signature |
Purpose |
|---|---|---|
|
|
Kinds |
|
|
Error bar kinds |
|
|
‘scd_line’, ‘bar’, ‘scatter’, ‘forest’, or ‘flow’ as a suggestion; a confirmed |
|
|
Mean and error records per bar; a bar with no whisker gives no error value and |
|
|
Effect, lower, and upper records per forest-plot row, top to bottom. |
|
|
|
|
|
n records from ‘n = N’ in a flow diagram, each named by up to five words before it. |
Agreement
Numeric fields with no valid paired values return empty error and bias metrics. kappa
requires equal-length label lists; icc requires finite ratings from at least two raters.
Excel exports preserve text beginning with = as literal text. Coding-sheet imports
require paper_id, field, and coded_value columns.
Name |
Signature |
Purpose |
|---|---|---|
|
|
Column order of |
|
|
Per-field agreement between extracted records and a human-coded sheet. |
|
|
Cohen’s kappa for two raters’ labels; None with fewer than two pairs or chance agreement 1. |
|
|
ICC(2,1) from an n targets by k raters array; None with fewer than two targets. |
|
|
Point-level error of extracted graph rows against a manual digitizer. |
|
|
Write records as an .xlsx for a second coder: the long columns and an empty |
|
|
Coded records from a filled coding sheet, with the coder’s |
Input and export checks
Codebook definitions, queries, and notes must be text; range bounds must be finite.
Model extraction keeps non-finite numbers and invalid passage citations under review.
Retrieval requires a positive integer top_k and finite embeddings with matching
dimensions. A retrieval cache tracks document content and encoder identity.
Effect calculations return not_computed with named checks for malformed numeric
inputs, fractional sample sizes, negative test statistics, or invalid variance overrides.
Wide exports reject generated column collisions. Matrix exports reject filename
collisions, including the reserved n.csv, repeated or reserved construct columns,
and asymmetric matrices. Normalized
construct names that match several constructs stay unmapped.