Original-language reader for Kant, Aristotle & more: select any passage to gloss, translate, or hear it read aloud, with exact citations.
README.md

Source reconstruction for the Kant texts #

Deterministic, re-runnable converters that turn authoritative digital editions into the repo's source-markdown format. The transforms are pure rule-based parsers — they never guess characters, so they cannot reintroduce the OCR-style garbling that motivated this work.

KrV A (1781) — convert-krv-a.ts #

Source: Deutsches Textarchiv, a double-keyed (manually transcribed twice, not OCR) diplomatic transcription of the actual 1781 first printing, in TEI-P5 XML.

raw/kant_rvernunft_1781.tei.xml   # downloaded TEI (see below)
bun scripts/sources/convert-krv-a.ts
out/KrV_A_1781/*.md               # 6 files, ready to diff against sources/Kant/KrV_A_1781/

Download the TEI (DTA gates it behind a JS-set cookie):

curl --cookie "verified=1" -L \
  https://www.deutschestextarchiv.de/book/download_xml/kant_rvernunft_1781 \
  -o scripts/sources/raw/kant_rvernunft_1781.tei.xml

What the converter does, all deterministically:

  • Page anchors — <pb n="N"/> → <a id="A{N}"></a> (the n attribute is the canonical 1781 page number; brackets like [17] stripped). Anchors land at the start of a word, never mid-word, matching the repo convention.
  • Orthography — ſ→s; archaic combining umlauts (a/o/u+U+0364) → ä/ö/ü. Original 1781 spelling is otherwise preserved (seyn, kan, Critik, Dyalectik).
  • Hyphenation — word divisions broken across a line/page are rejoined; genuine compound hyphens (Transscendental-Philosophie) and suspended hyphens (Erläuterungs- und …) are kept.
  • Headings — TEI <head> → ## (first per file) / ###; the body is partitioned into the repo's 6 files by an ordered pass over boundary divisions.
  • Footnotes — <note place="foot"> → [^n] markers + definitions.
  • Editorial corrections — DTA's 43 <choice><sic><corr> print-error fixes are applied (the <corr> reading wins).
  • Dropped — running heads, catchwords, signatures (<fw>), and decorative figures, none of which are body text.

Diplomatic vs. critical #

DTA is a diplomatic transcription: it reproduces the 1781 print faithfully, including a handful of the original's own typographic errors that modern critical editions (Akademie) silently correct — e.g. the 1781 print's "a weisen" (for abweisen) and "bedien" (for bedient). The converter applies only the corrections DTA itself marks; unmarked print readings are preserved. For verbatim formal quotation, cross-check specific passages against the Akademie-Ausgabe (AA IV / korpora.org).