Skip to content

🏛️ Data Architecture — dhatupatha ​

This document describes the directory structure, the data model, and the processing pipeline of the dhatupatha edition.


1. Project Directory Layout ​

text
dhatupatha/
├── assets/
│   └── birchville_logo.png           # Birchville Coat of Arms (Brand Asset)
│
├── data/
│   ├── dhatupatha_canonical.json     # Canonical Pāṇinīya reference database (1.7 MB, 2,259 roots)
│   ├── dhatupatha_complete.json      # Aligner master catalog with page concordance (2.1 MB)
│   ├── fonts/                        # Vendored OpenType fonts (Noto + Libertine)
│   │   ├── NotoSerifDevanagari-Regular.ttf
│   │   ├── NotoSerifDevanagari-Bold.ttf
│   │   ├── LinLibertine_R.otf
│   │   ├── LinLibertine_RB.otf
│   │   └── LinLibertine_RI.otf
│   └── pdf/
│       ├── Dhatu-patha.typeset_edition.pdf # Typographic vector re-edition (2.96 MB, 229 pages)
│       └── Dhatu-patha.typeset.typ         # Typst source code of the edition (1.8 MB)
│
├── docs/                             # Bilingual MkDocs documentation
│   ├── de/                           # German documentation (Default)
│   ├── en/                           # English documentation
│   ├── assets/                       # Logos and brand assets
│   └── stylesheets/                  # Birchville Scholarly Synthesis theme
│
├── scripts/                          # Automation & build scripts
│   ├── build_dhatupatha_groundtruth.py # Generates canonical ground-truth
│   ├── align_dhatupatha.py             # Bilingual facing-page alignment engine
│   └── build_typeset_edition.py        # Typst vector compiler
│
├── viewer.html                       # Standalone QA Viewer (Payer standard)
├── mkdocs.yml                        # Documentation site configuration
├── pyproject.toml                    # Python project configuration
├── requirements.txt                  # Python dependencies
├── LICENSE                           # MIT License
└── README.md                         # Project overview

2. The Four-Layer Data Model ​

text
Layer 1 — Facsimile Image Base
  Source:   410 historical book pages
  Purpose:  Visual background layer in 1:1 Sandwich PDF and primary citation reference

Layer 2 — Bilingual OCR & Facing-Page Geometry
  Content:  Parallel text layers of odd (Devanāgarī) and even pages (IAST)
  Purpose:  Cross-validation of degraded lead typography and complex ligatures

Layer 3 — Canonical Master JSON & Ground-Truth
  Storage:  data/dhatupatha_canonical.json & data/dhatupatha_complete.json
  Content:  2,259 structured root objects across all 10 Gaṇas with page concordance
  Status:   100.0% complete (0 duplicates, 0 omissions)

Layer 4 — Target Artifacts & Typographic Re-Edition
  Storage:  data/pdf/Dhatu-patha.typeset_edition.pdf & viewer.html
  Content:  Print-ready 229-page vector PDF in Typst and standalone QA Viewer

3. End-to-End Processing Pipeline ​

text
[Historical Scans (410 pages)]
       │
       ▼
[Step 1: Canonical Ground-Truth] ──► scripts/build_dhatupatha_groundtruth.py
       │                                └── data/dhatupatha_canonical.json (2,259 roots)
       ▼
[Step 2: Bilingual Alignment] ─────► scripts/align_dhatupatha.py
       │                                ├── Parallel state machine (Odd Deva / Even IAST)
       │                                └── Page concordance indexing
       ▼
[Step 3: Master Consolidation] ────► data/dhatupatha_complete.json
       │                                (Single Source of Truth, 2,259 entries)
       ▼
[Step 4: Multi-Artifact Build]
       ├── Typst Vector PDF:     data/pdf/Dhatu-patha.typeset_edition.pdf (~2.4s build)
       ├── Typst Source:         data/pdf/Dhatu-patha.typeset.typ
       └── QA Viewer:            viewer.html (Payer standard)

4. Dataset Metrics ​

MetricValueComment
Scanned Book Pages410 pagespp. 1–25 (Front Matter), pp. 26–285 (Main Corpus), pp. 286–410 (Back Matter)
Total Root Count2,259 rootsCompletely captured across all 10 Gaṇas
Gaṇa Classes10 classes1. Bhvādi to 10. Curādi
Duplicates / Missing0 / 0100.0% aligned against the grammatical canon
Typst Book Length229 pagesSection-specific layout (1-column prose / 2-column dictionary)
Typst Compile Time~2.4 secondsVector rendering via Typst 0.11+
Font Vendoring5 OpenType filesHermetically bundled in data/fonts/ (Zero Tofu)

5. Data Model Specification (dhatupatha_complete.json) ​

Each of the 2,259 entries has the following schema:

json
{
  "id": 1,
  "gana": 1,
  "gana_name": "भ्वादिगणः",
  "gana_iast": "Bhvādigaṇaḥ",
  "dhatu": "भू",
  "iast_dhatu": "bhū",
  "aupadeshik": "भू",
  "iast_aupadeshik": "bhū",
  "pada": "parasmaipada",
  "settva": "seṭ",
  "karma": "akarmaka",
  "artha": "सत्तायाम्",
  "iast_artha": "sattāyām",
  "artha_english": "to be, to exist",
  "orig_page": 26,
  "commentary_note": ""
}
FieldTypeDescription
idIntegerUnique sequential ID (1 to 2,259)
ganaIntegerRoot class number (1 to 10)
gana_nameStringGaṇa name in Devanāgarī (e.g., भ्वादिगणः)
gana_iastStringGaṇa name in IAST (e.g., Bhvādigaṇaḥ)
dhatuStringCanonical root in Devanāgarī (e.g., भू)
iast_dhatuStringRoot in scientific IAST transliteration
aupadeshikStringTraditional Aupadeśika citation form with anubandha markers
iast_aupadeshikStringAupadeśika form in IAST
padaStringVoice classification (parasmaipada, ātmanepada, ubhayapada)
settvaStringAugment marker (seṭ, aniṭ, veṭ)
karmaStringTransitivity (sakarmaka, akarmaka, dvikarmaka)
arthaStringTraditional Sanskrit locative meaning (e.g., सत्तायाम्)
iast_arthaStringLocative meaning in IAST (e.g., sattāyām)
artha_englishStringEnglish gloss of basic meaning
orig_pageIntegerHistorical scan page number (e.g., 26)
commentary_noteStringAdditional grammatical notes

Canonical digital edition according to the Böhtlingk standard · Birchville Scholarly Synthesis