Sheaf Analyzer v2 — manual and technical specification
The Sheaf Analyzer reads a text and answers three questions. Can the claims it makes all be true together? Where not, it gives the smallest set of sentences that cannot hold, with a witness. How is the text built? It reports who says what, which figures and dates it rests on, how its arguments are put together, and which rhetorical and statistical patterns it uses. What should a reader check? It gives a ranked list of claims, the arithmetic it can recompute, and the reporting gaps in research papers.
It does not decide whether anything is true. A text can be perfectly consistent and false, and a contradiction tells you that at least one of the sentences involved is wrong, not which one. Most components are deterministic rules; their limits are stated below for each.
- Using the analyzer
- Pipeline overview
- Input, files and segmentation
- Claim extraction
- The three consistency layers
- Mathematics: sheaves, Hodge, temporal networks
- Obstructions, classes and Γ
- Ψ: epistemic closure
- Insights
- The graph
- Argument map (Ishikawa diagrams)
- Review tools
- Validation
- Limitations
- Privacy and network use
- Exports
- References
1. Using the analyzer
Inputs
- Paste any text into the source box and press ▸ Analyze. Markdown is understood (headings, lists, tables, links, code blocks).
- Upload file (⇪ Upload file, or drop a file on the text box): .txt, .md, .docx and .pdf, up to 40 MB. The file is read in your browser; the extracted text appears in the box and is analysed at once. Scanned PDFs without a text layer give no text; run OCR first.
- Fetch URL: the page is fetched through a public reader proxy (r.jina.ai) that returns its main text; if that fails a direct fetch is tried (most sites block it).
- Corpus: select Draken posts and analyse them together; each post is a source, and conflicts between posts are marked cross-post.
- Compare: two versions of a text. Obstructions are sorted into persistent, new in B, resolved since A, and B-contradicts-A.
- Samples: fictional texts that exercise every component (the contradiction demo, conflicting accounts, an echo chamber, a paper with reporting errors) and real excerpts.
Outputs, top to bottom
- Verdict and Γ cards: per layer, whether the asserted claims glue (Γ = 1), do not (Γ = 0), or there is nothing to compare (N/A); counts of obstructions by class; exports.
- Ψ: support-graph closure measures (ground, circ, seal, imp).
- Argument map: one Ishikawa diagram per argument, with a detail pane for any node.
- Rhetoric & review: the rhetoric profile first (headline figures, then logos/ethos/pathos, loaded words and framing, and stance side by side); then sentiment, fallacies and devices, sources, fact-check and paper review. Paper review is marked n/a when the text does not look like a research paper.
- Insights: overview, entities and concepts, figures, timeline, arguments, who says what, possible tensions, repeated statements.
- Obstructions, timeline, accounts, the graph, the inspector and the source text with highlights. Tapping any finding highlights its sentences in the source text.
2. Pipeline overview
text / file / URL / corpus→segmentation→boilerplate removal→typed claims→3 layers→obstructions, Γ→Ψ→insights · argument maps · review
Everything runs in the browser in plain JavaScript (no server, no model calls). A typical post of 3,000 words takes well under a second; the whole 90-post corpus about 1.5 s for the consistency engine. The engine files are engine-math.js (algebra and graph algorithms), engine-text.js (segmentation, claims, layers, Ψ), engine-insights.js, engine-argument.js, engine-rhetoric.js, engine-sentiment.js, engine-stats.js and engine-review.js; the page is assembled from them by assemble.js.
File reading
- .txt / .md: read as UTF-8; Windows line endings are normalised.
- .docx: a .docx is a ZIP archive. The analyzer reads its central directory, inflates word/document.xml with the browser's built-in DecompressionStream('deflate-raw'), and takes each paragraph (w:p) as a line: text runs, tabs and line breaks are kept; paragraphs styled Heading 1–6 or Title become Markdown headings; numbered or bulleted paragraphs become list items. Footnotes, comments and text boxes are not read. Old binary .doc files are not supported.
- .pdf: pdf.js 4.10.38 (Mozilla, Apache-2.0), self-hosted on this site and loaded only when a PDF is opened, extracts the text items of each page with their positions. Lines are rebuilt from the vertical positions; a line break becomes a paragraph break when the gap is larger than 1.45× the normal line spacing on the page (the lower quartile of line gaps) (or 1.15× after a sentence end followed by a capital); words hyphenated across a line end are rejoined; a short line that recurs, digits aside, at the top or bottom of at least 60% of pages (minimum three) is removed as a running header or footer. Script evaluation inside pdf.js is disabled. Multi-column layouts are read in the order pdf.js returns them, which is usually but not always column by column.
Segmentation
The text is split into units, normally sentences, with character offsets into the original text (UTF-16), so every finding can be highlighted exactly. Rules:
- A unit never spans a line break. Headings, list items and table rows are units of their own, so whether a line ends with a full stop never changes what a claim is.
- Sentences end at . ! ? … followed by whitespace or the end of the line. A dot inside a token (3.5, example.com, 10.1038/…) does not end a sentence; abbreviations such as e.g., i.e., et al., Dr., Prof., no., fig., vs. do not either.
- Code blocks are skipped. Units are flagged as non-claims when they are inside a references/sources/notes section, look like a bibliography line or citation, contain math markup, are HTML, metadata lines (Key: value) or table rows. Non-claims are shown but produce no claims.
- Boilerplate: a short text (≤ 14 words) that recurs at least three times, spread through the document, with page numbers that increase (a running header), or at least four times unchanged (a fixed footer), is marked as boilerplate. A running header glued into another sentence is blanked out of that sentence. Three sentences that state three different values about the same thing are neither, so real conflicts are not removed.
4. Claim extraction
Each unit yields zero or more typed claims. Every claim records its unit, the quote, its modality, its polarity and its frame.
| type | made when | content |
| proposition | the frame has ≥ 3 content words | frame + polarity |
| numeric | the unit has a non-year number and the frame ≥ 2 words; no formula symbols | values with unit (%, km, kg, currencies, people, deaths, years, …), scale words (thousand … billion, miljoner …), hedge flag (about, approximately, ~ …), years in the sentence as temporal scope |
| date | exactly one date (ISO, “3 March 2025”, “March 3, 2025”, “March 2025”, “in 2025”) or one bare year as scope | interval in days [lo, hi] at day, month or year precision |
| order | “A before/after B” (also prior to, preceded, following, innan, före, efter) in a non-negated sentence | two frames and the relation, with an offset when stated (“three days before”) |
| relation | “X is N more/less/longer/… than Y” | signed difference N from Y to X, with unit |
- Modality: question (ends with ?), reported (said, claimed, according to, testified, denied, enligt, uppgav …; the source is the phrase after “according to” or the words before the reporting verb), hypothesized (may, might, could, perhaps, if, whether, suppose, kanske …), otherwise asserted. Only asserted claims can make a contradiction; reported speech is never treated as the author's own claim.
- Polarity: −1 if the sentence has an odd number of negations (not, no, never, none, n't, inte, aldrig, ei …) after removing contrastive constructions that do not negate the claim (“not only”, “not X but Y”, “, not Z”, “no longer/more/matter/doubt”), else +1.
- Frame: the set of content words (lower-cased, stopwords in English and Swedish removed, light stemming, numbers, dates and month names removed). For reported speech the frame is taken from the reported content after the verb, so “X said that the gate was locked” and “the gate was locked” share a frame.
- Not quantities: section, step, layer, axiom, DRK, figure, table, version and similar identifiers; ordinals; list markers; citation years in parentheses; inline math; numbers glued to all-caps prefixes (“GA 348”).
5. The three consistency layers
Two claims are comparable only if they talk about the same thing: their frames overlap strongly (Jaccard similarity $J(A,B)=|A\cap B|/|A\cup B|$). Candidate pairs are found through an inverted index on each claim's rarest frame words, so large corpora are not compared all-to-all.
Linear layer (quantities)
- Numeric claims are comparable when $J \ge 0.6$, both frames have ≥ 2 words, they have the same number of values, the same temporal scope (years) and the same polarity, and their units match.
- For each value pair the gluing residual is the relative difference $r=|a-b|/\max(|a|,|b|)$. Tolerance is 10% when either value is hedged (“about 40”), otherwise exact. If any residual exceeds tolerance, the pair is an obstruction with magnitude $\max r$.
- Explicit relations (“X is 5 m longer than Y”) form an edge cochain on a graph of entities; see Hodge decomposition below. A non-zero harmonic part is an obstruction: the stated differences cannot all hold around a cycle.
Ordinal layer (time)
- Dated claims about the same event (frames with $J \ge 0.6$) are merged into one event; order statements attach to events at $J \ge 0.5$.
- Each date gives two difference constraints against an origin $O$: $t_E - t_O \le hi$ and $t_O - t_E \le -lo$. “A before B” gives the strict constraint $t_A < t_B$; with a stated offset of $k$ days it gives $k \pm \max(1, 0.1k)$.
- The system is a simple temporal network. It is feasible iff its constraint graph has no negative cycle (strict arcs: no cycle of weight $(0,\text{strict})$). See below.
- When infeasible, the cycle's claims are reduced to a minimal unsatisfiable subset (MUS) by a deletion filter; the magnitude is $\varepsilon^{*}$, the smallest uniform widening (in days) of every constraint that restores feasibility. One claim of each MUS is set aside and the search repeats, so independent conflicts are all found (up to 12 per pass). Passes run on asserted claims, on non-asserted claims, and on all claims together.
Propositional layer (polarity)
- Propositions are comparable when $J \ge 0.8$ and both frames have ≥ 3 words. Opposite polarity on the same frame is $P \wedge \neg P$: an obstruction with the similarity as witness.
6. Mathematics
Cellular sheaves
A cellular sheaf $\mathcal F$ on a graph assigns a vector space (stalk) to each vertex and edge and a linear restriction map from each vertex to each incident edge. The coboundary $\delta^0: C^0\to C^1$ sends vertex values to their disagreement on each edge; global sections are $H^0=\ker\delta^0$, and $H^1=C^1/\operatorname{im}\delta^0$ measures edge data that no vertex assignment explains (Curry 2014; Hansen & Ghrist 2019). The engine implements general sheaves with $\delta^0, \delta^1$, cohomology dimensions by rank (modified Gram–Schmidt with tolerance), and the sheaf Laplacian.
Hodge decomposition of relation data
For explicit relations the graph has one vertex per entity and one edge per stated difference $y_e$ (constant scalar sheaf). The edge cochain splits orthogonally as
$$ y = \underbrace{\delta^0 x}_{\text{gradient}} + \underbrace{h}_{\text{harmonic}} + \underbrace{(\delta^1)^{\!\top} z}_{\text{curl}}, $$
the decomposition used in HodgeRank (Jiang, Lim, Yao & Ye 2011; Lim 2020). Without 2-cells the curl part is zero. If $\|h\|>10^{-6}$, the differences cannot come from any assignment of values to the entities: the stated relations are inconsistent around a cycle, and the edges with non-zero harmonic weight are reported. Example: east = west + 12, west = north + 5, east = north + 4 gives $\|h\| > 0$.
Simple temporal networks
Constraints $t_v - t_u \le c$ become arcs $u\to v$ of weight $c$; a set is satisfiable iff no cycle has negative total weight (Shostak 1981; Dechter, Meiri & Pearl 1991). Strict inequalities use lexicographic weights $(c, -s)$, $s=1$ for strict, so a cycle of weight $(0,-k)$ with $k>0$ is also infeasible. Feasibility is decided by Bellman–Ford with cycle extraction; a feasible run yields a schedule (the reconstructed timeline). Karp's algorithm gives the minimum mean cycle weight $\mu^{*}$ (Karp 1978); the minimal uniform widening is $\varepsilon^{*} = \max(0,-\mu^{*})$. The MUS uses the deletion filter (Chinneck & Dravnieks 1991): drop each constraint in turn and keep it only if the rest becomes feasible without it.
Note on cycle bases: interval constraints cannot be checked cycle by cycle on a basis. A theta graph has feasible basis cycles and an infeasible combination, so the engine always searches the full constraint graph.
7. Obstructions, classes and Γ
An obstruction (κ) is a minimal set of claims that cannot hold together, with its layer, kind (gluing residual, harmonic class, negative cycle, strict order cycle, polarity), magnitude and a human-readable witness. Its class depends on the modalities involved:
| class | when | meaning |
| contradiction | all claims asserted | the text itself asserts things that cannot all be true |
| inconsistent-testimony | all reported, same source | one source contradicts itself |
| conflicting-accounts | reported by different sources, or mixed | sources disagree; the text relays the disagreement |
| tension-with-hypothesis | a hypothetical claim is involved | a hypothesis conflicts with what is stated |
| question | a question is involved | shown for completeness |
Pairwise linear or propositional conflicts that share claims are merged into one finding per connected group: $k$ sentences giving different values for one thing are one obstruction, not $k(k-1)/2$.
Γ per layer is binary: 1 if the layer has comparable asserted claims and none of them form a contradiction, 0 if at least one contradiction exists, N/A if nothing in that layer is comparable. The agreement rate shown beside it is the share of comparable pairs that glue; it is descriptive, not Γ.
8. Ψ: epistemic closure
Ψ describes how conclusions are supported, from a support graph: an edge from sentence A to sentence B when B opens with an inference marker (therefore, thus, hence, consequently, this shows/means/proves, that is why, därför, alltså …) and A precedes it in the same paragraph. A sentence is anchored when it carries a link, DOI, numbered or author–year citation, “according to” + name, or a year.
- ground: share of supported conclusions that no chain from an anchored sentence reaches (ungrounded reasoning).
- circ: number of support cycles with no anchored member (circular reasoning).
- seal: sentences that combine an evidence verb (is evidence, proves, confirms, shows) with absence, denial or suppression (no evidence, cover-up, deny, the official story …): self-sealing moves, where counter-evidence is read as confirmation.
- imp: number of asserted contradictions (from the layers).
Ψ is a prototype. Its validation on conspiracy-theory text (the LOCO corpus, Miani, Hills & Bangerter 2022) has not been done. Treat it as a description of argument structure.
9. Insights
- Entities: capitalised names (multi-word names merged, sentence-initial and stop words excluded, “A and B” split); concepts: frequent content-word stems. Each lists mentions, claims and involvement in obstructions.
- Figures and timeline: every numeric and dated claim, with modality and conflict status; order statements.
- Arguments: premise → conclusion pairs from the support graph, ungrounded conclusions, self-sealing sentences, hedged statements.
- Who says what: reported statements grouped by source.
- Possible tensions (not obstructions): looser matches for a human to check: opposite polarity at $0.6\le J<0.8$; different values with the same unit at $0.4\le J<0.6$; non-overlapping dates for similar events at $0.4\le J<0.6$.
- Repeated and consistent: comparable pairs that glue (for propositions, only if their digits are identical).
10. The graph
A force-directed 2D graph (canvas, no external library). Hubs are the top 40 entities and 12–18 concepts; small nodes are claims. Links: mentions, co-occurrence, conflict (red), glue (green), shared event and support (arrows). Density: conflicts (only what is involved in obstructions), map (balanced), full. Pan by dragging the background, zoom with wheel, pinch or buttons, drag nodes, search by name. A tap selects a node when the finger moves less than 10 px (4 px with a mouse); the touch target is the drawn circle plus 16 px. Selecting a node shows it in the inspector and highlights its sentences.
11. Argument map (Ishikawa diagrams)
An Ishikawa or fishbone diagram (Ishikawa 1976) puts an effect at the head and its contributing causes on bones. Here the head is a thesis and the bones are what the thesis rests on. Each argument in the text gets its own diagram.
Choosing theses
Every eligible sentence (≥ 6 words, not a question, table row, licence or metadata line) gets a claim score, the sum of:
- Inference structure: +3 per incoming support edge, +2.5 for a conclusion marker (in conclusion, therefore, thus, we argue, this paper shows …), +2 for a finding statement (we found, our results show …), +1 for a causal or general claim, +1 lead sentence, +0.5 closing sentence, −1.5 method description. A formula or fragment keeps at most 1 point from these.
- Claim form: +2 for a labelled claim (“The central consequence.”, “Principle 2.7:”, “Theorem”, “Hypothesis”, “Prediction”, or a sentence that follows such a label); +1.2 for a general statement (every, always, never, only, all, cannot, must …); +0.6 for a claim verb (predicts, implies, determines, rises, splits, depends on …); −0.5 when hedged.
- Where it stands: +2.5 in a section whose heading path names an abstract, summary, core or central claim, thesis, introduction, results, findings, discussion, conclusion, predictions or principles; −2.5 in definitions, notation, proofs, appendix, references, tables, errata, versions, ledgers, glossaries, methods, data or front matter.
- Penalties: formula-heavy sentences −4; fragments that begin in lower case, with a digit or with punctuation −5; no sentence end (table cells, captions) −2; cross-references (“Defined in”, “See”, “Table”, “Appendix” …) −4; many citations or DRK references −2; short semicolon lists −1.5; anaphoric openings (it, this, they, such …) −1.5; under 6 words −3, under 8 words −1, over 70 words −1.
- Centrality: + the sentence's normalised mean word-overlap with the other sentences of its section (cf. TextRank, Mihalcea & Tarau 2004).
Theses are accepted greedily, highest score first: the first always, further ones only with a score ≥ 3, at most two per section, only if they differ from those already chosen ($J<0.25$) and neither is a premise of the other. Then each section of eight or more sentences without a thesis (and not a definitions/appendix-type section) may add its best sentence if it scores ≥ 1.5. At most 8 theses for texts over 300 sentences; otherwise up to 6 (one per section, or one per five sentences without sections). You can change any thesis or start a new argument from any sentence.
Uploaded PDFs keep their structure for this purpose: lines in larger type, or short numbered lines set off from the text (“1.2 The core claim”), become headings; lines with three or more widely spaced cells become table rows; a sentence broken by a page break is rejoined.
Attaching sentences
A sentence whose support chain reaches a thesis joins that thesis (shortest chain). Otherwise it joins the thesis with the highest score $J + 0.15\,[\text{same section}] + 0.06/(1+d/8)$, where $d$ is the distance in sentences. With several theses a sentence scoring below 0.1 stays unattached and is listed under the diagram.
Bones and effects
| bone | items | effect on the thesis |
| Reasoning | premises on a support chain (direct, or n steps out); sentences with an in-sentence reason (because, since, due to); related claims sharing terms | + supports (chains, reasons) · elaborates (related claims) |
| Evidence | sentences with numeric, date or order claims or figures | + supports; − if the figure conflicts with another sentence |
| Sources | reported statements with a named source; citations | + named; ~ unnamed (“experts”, “studies”) |
| Assumptions | hedged or hypothetical statements; ungrounded intermediate conclusions | ~ qualifies; − ungrounded |
| Counterpoints | sentences in an obstruction; sentences opening with however, but, yet, although … | − weakens; ~ contrast |
| Rhetoric | fallacy candidates; loaded or strongly valenced wording | ∅ persuades without support |
A sentence can sit on several bones. The detail pane shows its full text and section, its role and effect, a sentence on how it contributes, the inference chain to the thesis step by step with the linking words, the words it shares with the thesis, conflicts, its extracted claims, signals from the other analyses, and verification links. For the thesis, the pane counts what is on each bone and names the structure:
- Contested: the thesis itself is in an obstruction.
- Argued and evidenced: linked premises plus figures or named sources.
- Argued without evidence: linked premises, no figures or named sources.
- Evidenced but not argued: figures or sources nearby, no inference marker linking them to the thesis.
- Supported by in-sentence reasons only, or Asserted: nothing attached.
Most prose uses few explicit inference markers between sentences, so in long texts most attachments come from shared words and section placement and appear as “elaborates”. The map shows how an argument is built, not whether it holds.
12. Review tools
Fact-check
Each sentence gets a check-worthiness score (in the spirit of ClaimBuster, Hassan et al. 2017, but a transparent hand-set score, not a trained model): quantity +2, date +1, named entity +1, superlative or comparison +1.5, causal claim +1, statistic word +0.5, attributed +1, vague attribution +2, long quotation +0.5, internal conflict +2, arithmetic mismatch +2; opinion −1.5, hypothesis or question −1. Sentences scoring ≥ 2.5 are listed (top 40) with what would settle them (the primary dataset for the same population, unit and period; a contemporaneous record of a date; the original statement in context; the identity of unnamed experts; the full comparison set behind a superlative; a design able to show causation) and search links (Google Fact Check Explorer, Google Scholar, Wikipedia, web).
Arithmetic is recomputed exactly: “from A to B, an increase of C%” (relative change, with notes when C equals the absolute or percentage-point difference or the change relative to the end value), percentage points, “doubled/tripled/halved” (±10%), “X of Y (Z%)” and shares above 100% of a population.
Paper review
- Recomputed tests (after statcheck, Nuijten et al. 2016): APA-style $t(df)$, $F(df_1,df_2)$, $\chi^2(df)$, $r(df)$ and $z$ with a reported p. The p-value is recomputed from the regularised incomplete beta and gamma functions (two-tailed for t, r and z) over the rounding interval of the reported statistic. A result is inconsistent if no value in that interval reproduces the reported p at its precision, a decision error if the inconsistency crosses .05, and consistent (one-tailed) if it matches when halved and a one-tailed test is stated nearby.
- GRIM (Brown & Heathers 2017): for a mean M reported to d decimals with sample size n in the same sentence, is there an integer total whose mean rounds to M? Not testable when $n\ge 10^d$. Valid only for single-item integer data.
- p-value profile: exact versus thresholded reporting; share of significant exact p in (.04, .05] (a pattern worth checking, cf. Head et al. 2015); ten or more p-values with no multiple-comparison correction mentioned.
- Checklist: sections (abstract, methods, results, discussion, limitations, references) and statements (preregistration or trial registration, data availability, code availability, ethics approval, conflicts of interest, funding, power analysis, effect sizes, confidence intervals, blinding); design signals (RCT, experiment, quasi-experiment, cohort, case-control, cross-sectional/survey, correlational, meta-analysis, qualitative, simulation, case report, preprint).
- Causal language in a non-experimental design: causes, leads to, results in, improves, reduces … without may/might/associated, when only observational design signals are present. Overclaiming: proves, conclusively, breakthrough, paradigm shift, for the first time, unprecedented …
- References: entries, median and range of years, entries older than ten years, entries with a DOI. DOI check (on request): each DOI is looked up in Crossref; the table shows whether it resolves, the registered title and journal, the share of its title words that appear within 400 characters before the DOI in your text (a low share can mean a mismatched or invented citation, or a format without titles), and any update notices (retraction, correction, expression of concern) Crossref lists. DataCite DOIs (Zenodo, figshare) are not in Crossref.
Sources
Links by domain type (scholarly, government and intergovernmental, reference, news, social/video, blog/self-published, archive, link shortener, other), DOIs, arXiv identifiers, ISBNs, in-text citations, references per 1,000 words, share of https links, and attribution: reported statements with a named source versus vague attributions (“experts say”, “studies show”, “sources said”). Outlets are categorised, never rated.
Sentiment
A line-by-line JavaScript port of VADER 3.3.2 (Hutto & Gilbert 2014; MIT licence; 7,506-entry lexicon), scored per sentence: lexicon valence, boosters and dampeners, negation within three words, “but” shifts, capitalisation and punctuation emphasis, normalised compound $s/\sqrt{s^2+15}$. Thresholds ±0.05. Shown: mean, counts, the sentiment arc (one dot per sentence up to 400 sentences; above that, a band per slice with a rolling mean; tap anywhere to read the nearest sentence, its score, the words driving it and its post and section, then step to the previous, next, next negative or next positive sentence), the most negative and positive sentences, the words driving the score, and the mean tone of sentences mentioning each entity. VADER was built for short social-media text; on long prose, read the arc and the extremes.
Loaded words and framing
Loaded or pejorative terms (a curated list: regime, elites, so-called, propaganda, hoax, slams …), VADER words with $|v|\ge 2.5$, and absolutes (always, never, everyone …), per 1,000 words. Framing vocabulary: curated lists of terms conventionally associated with left- or right-leaning usage in English (mainly US/UK) discourse, following the phrase-frequency approach of Gentzkow & Shapiro (2010). The gauge is $(R-L)/(R+L)$, shown only with three or more hits. It describes vocabulary, not the author's politics: quoting or criticising a term counts the same.
Stance
Metadiscourse markers after Hyland (2005), per 1,000 words: hedges, boosters, attitude markers, must/should; certainty $(B-H)/(B+H)$; self-mention, in-group (we/us/our), out-group (they/them/their) and reader address (you/your); us-versus-them $(we-they)/(we+they)$; imperatives, questions, future and past markers.
Fallacies and rhetorical devices
Fallacy candidates by cue phrase: ad hominem, whataboutism/tu quoque, bandwagon, unnamed authority, false dilemma, slippery slope, sweeping generalisation, post hoc, appeal to fear, appeal to nature, appeal to tradition, appeal to ignorance, loaded question, straw man cues, anecdotal evidence; plus two structural detectors from the support graph: circular reasoning (Ψ circ) and self-sealing (Ψ seal). Devices: hypophora, rhetorical questions, anaphora (three or more sentences, or the same three opening words), epistrophe (same last two words), antithesis (“not X but Y”, excluding “not only … but also”), parallel tricolon, epizeuxis, chiasmus (A … B in one clause, B … A in the next), alliteration (three adjacent words of four or more letters with the same initial consonant), hyperbole, scare quotes (after so-called, or their/these + an evaluative noun). All are candidates with their evidence.
Logos, ethos, pathos
Marker counts per 1,000 words. Logos: quantities and dates, measurement terms, citations, grounded support edges (not ending in an ungrounded or self-sealing sentence), half-weight inferential connectives. Ethos: credentials and trust terms, named attribution, half-weight hedges. Pathos: loaded and strongly valenced words, fear, anger, hope and sadness terms, exclamation marks, half-weight second-person address. A proxy, not a validated measure.
13. Validation
The v2 engine was tested with the perturbation protocol preregistered for the v1 audit (seed 201; docs/sheaf-analyzer-v2), on the 88 English Draken posts. A perturbation is detected when an obstruction involves the injected sentence. Current results (after the sentence-splitter fix of 10 October 2026):
| test | v2 | word-overlap baseline | v1 |
| NEG: a negated copy of a sentence is inserted | 83.0% (73/88) | 76.1% | ≈ 0% |
| NUM: a copy with every number +7 is inserted (sentences carrying an extracted quantity or date) | 48.1% (13/27); 65.5% (19/29) before the fix, on a different random sample; on identical perturbations 23 of 32 after the fix vs 24 before | 92.6% | 0% |
| False alarms: contradictions in the unmodified posts | 0 of 88 posts | 32 of 88 | — |
| DUP control: an exact copy is inserted | 0 / 88 flagged | 32 / 88 | — |
| TOPIC: 25% of sentences replaced from another post; Γ must not rise | rose in 0 / 88 | — | rose |
| SHUFFLE (paragraph order) and SEGMENT (line-final full stops removed): obstruction set unchanged | 88 / 88 and 88 / 88 | — | — |
Most NUM misses are numbers the engine deliberately treats as identifiers (layer, step and DRK numbers, citation years); the baseline's higher rate comes with 32 false alarms in 88 unmodified posts. Other checks: the mathematics test suite (Hodge generators, twisted sheaves, partial holonomy, the theta graph, strict cycles, a temporal fixture with a −854-day cycle, its minimal unsatisfiable subsets, Karp's −213.5 and the corresponding ε*); VADER parity with the reference Python package on 19,748 sentences (identical scores; nine sentences with emoji symbols skipped, since the port omits emoji-to-text); the t, F, χ² and z distribution functions against SciPy on 134 cases (maximum relative error $2\times10^{-12}$); fixtures for statcheck, GRIM, arithmetic, fallacies, devices, framing, sources and argument maps. On the 90-post corpus the fallacy detectors raise 9 candidates in total.
14. Limitations
- Rule-based extraction: it misses claims phrased indirectly, and it compares only claims whose wording overlaps strongly. Paraphrases with different words are not compared. Coreference (“he”, “the company”) is not resolved.
- English is the main language; Swedish negations, reporting verbs, months and stopwords are covered for the consistency layers. The review tools are English only.
- Γ and the obstructions concern internal consistency. They do not check facts against the world.
- The fallacy, device, framing, stance, loaded-word and appeal detectors are curated cue lists, not trained or validated against annotated data. They show candidates with evidence.
- Sentiment uses a lexicon tuned for social media.
- Paper review sees only the text you provide; a missing statement may be on a page you did not paste.
- PDF extraction depends on the PDF's text layer and layout; scanned documents need OCR.
15. Privacy and network use
All analysis runs in your browser. Pasted text and uploaded files are not sent anywhere. Network requests happen only for: the page itself; the sentiment lexicon (/data/vader-lexicon.json) and, when you open a PDF, the pdf.js library (/vendor/), both from this site; the corpus list when you use corpus mode; r.jina.ai (the URL you enter) when you press Fetch URL; api.crossref.org (the DOIs only) when you press the DOI check; and the external search pages you choose to open.
16. Exports
- Markdown report: Γ, obstructions with quotes, highlights, review flags, sentiment, framing, stance, appeals, fallacy candidates, the fact-check list and every argument map with its items and how they contribute. Written to paste into a Claude or Draken session.
- Deep JSON: the full result, including claims, comparisons, Ψ, timeline, Hodge data, insights, review output and Crossref results.
- Flat JSON: claims and comparisons only.
- Fact-check checklist: copy button in the Fact-check tab.
Source code, tests and the v1 audit are in the draken.info repository under scripts/sheaf-analyzer-v2/ and docs/sheaf-analyzer-v2/. Run test-math.js, test-protocol.js, test-sentiment.js, test-stats.js and test-review.js with Node.
17. References
- Brown, N. J. L., & Heathers, J. A. J. (2017). The GRIM test: A simple technique detects numerous anomalies in the reporting of results in psychology. Social Psychological and Personality Science, 8(4), 363–369.
- Chinneck, J. W., & Dravnieks, E. W. (1991). Locating minimal infeasible constraint sets in linear programs. ORSA Journal on Computing, 3(2), 157–168.
- Curry, J. (2014). Sheaves, cosheaves and applications (Doctoral dissertation). University of Pennsylvania.
- Dechter, R., Meiri, I., & Pearl, J. (1991). Temporal constraint networks. Artificial Intelligence, 49, 61–95.
- Gentzkow, M., & Shapiro, J. M. (2010). What drives media slant? Evidence from U.S. daily newspapers. Econometrica, 78(1), 35–71.
- Hansen, J., & Ghrist, R. (2019). Toward a spectral theory of cellular sheaves. Journal of Applied and Computational Topology, 3, 315–358.
- Hassan, N., Arslan, F., Li, C., & Tremayne, M. (2017). Toward automated fact-checking: Detecting check-worthy factual claims by ClaimBuster. Proceedings of KDD 2017, 1803–1812.
- Head, M. L., Holman, L., Lanfear, R., Kahn, A. T., & Jennions, M. D. (2015). The extent and consequences of p-hacking in science. PLoS Biology, 13(3), e1002106.
- Hutto, C. J., & Gilbert, E. (2014). VADER: A parsimonious rule-based model for sentiment analysis of social media text. Proceedings of ICWSM-14.
- Hyland, K. (2005). Metadiscourse: Exploring interaction in writing. Continuum.
- Ishikawa, K. (1976). Guide to quality control. Asian Productivity Organization.
- Jiang, X., Lim, L.-H., Yao, Y., & Ye, Y. (2011). Statistical ranking and combinatorial Hodge theory. Mathematical Programming, 127, 203–244.
- Karp, R. M. (1978). A characterization of the minimum cycle mean in a digraph. Discrete Mathematics, 23(3), 309–311.
- Lim, L.-H. (2020). Hodge Laplacians on graphs. SIAM Review, 62(3), 685–715.
- Miani, A., Hills, T., & Bangerter, A. (2022). LOCO: The 88-million-word language of conspiracy corpus. Behavior Research Methods, 54, 1794–1817.
- Mihalcea, R., & Tarau, P. (2004). TextRank: Bringing order into texts. Proceedings of EMNLP 2004, 404–411.
- Nuijten, M. B., Hartgerink, C. H. J., van Assen, M. A. L. M., Epskamp, S., & Wicherts, J. M. (2016). The prevalence of statistical reporting errors in psychology (1985–2013). Behavior Research Methods, 48(4), 1205–1226.
- Shostak, R. (1981). Deciding linear inequalities by computing loop residues. Journal of the ACM, 28(4), 769–779.
Third-party code: VADER lexicon (MIT, C. J. Hutto; licence at /data/vader-LICENSE.txt); pdf.js 4.10.38 (Apache-2.0, Mozilla; licence at /vendor/pdfjs-4.10.38/LICENSE).