Skip to content

Data

Data & pipeline

Updated Verified against fe1ff7d on 2026-09-25

Page actions

ChatGPT and Claude are third-party services. The link gives them this page's public address and a short instruction. This site records nothing.

Where the scripture data comes from, how it is proven, how it reaches this platform by pin, and which pages explain each part — with the canonical sggs-data documents published beside them.

Everything the API serves comes from one artifact: a SQLite database of 60,658 line records over Angs 1–1430, built by a reproducible pipeline from the source Bir PDF and proven, character for character, to contain exactly the printed text. That artifact is built, gated and published in the data repository, Algorythmos-AI/sggs-data; this platform never edits it and never commits a copy — it pins a commit and a checksum (dataset.lock.json) and installs exactly that object.

The pages

  • Anatomy of a line recordThe 23 columns of the lines table, how a page becomes rows, what search reads (Poster 03 walkthrough · a live Ang explorer against the real API)
  • Corpus pipeline and gatesrebuild_all.sh stage by stage, and the gates that stop it (Poster 04 walkthrough · code read from sggs-data at the pinned commit)
  • Data dictionaryEvery table in the pinned database: its layer, columns, row count and the API context that reads it (Generated from the database; CI fails if it drifts)
  • The dataset pinHow this platform obtains the database, what it verifies, how a new dataset arrives (The lock, the fetcher’s guarantees, a pin bump end to end)
  • The editorial ledgerWhat may change in the text, what never does, and how a fidelity concern travels (The rules and their applications, the review flow)
  • The English translation layerWhere the English comes from, how it is matched to lines, how it stays separate, English search, and its licence status (Two sources, one translator)
  • The integrity chainOne line of scripture from the source PDF to a screen, and the gate that proves it at each stage (Six stages, each read against the code that enforces it)

Pinned from sggs-data

The canonical data documents live in the data repository. The wiki publishes them here by pin (docs-site/sources.lock.json records the commit and the sha256 of every file), with a banner that says where the canonical file is; edit them there.

DocumentCanonical file
Database schema and the comp_id modeldocs/architecture/database-schema.md
Scripture integrity: the guarantee chain, the proof tools, the hash chaindocs/architecture/scripture-integrity.md
Runbook: rebuild the database from the PDFdocs/process/runbooks/rebuild-db.md
Runbook: restore the data from backupsdocs/process/runbooks/data-restore.md
ADR-0002 · keep-last comp_id regroupdocs/adr/0002-comp-id-keep-last-regroup.md
ADR-0003 · integrity proofsdocs/adr/0003-integrity-proofs.md
ADR-0004 · backups and restoredocs/adr/0004-backups-and-restore.md
The Answer Protocol: how Gurbani questions are answeredAnswer-Protocol.md

The numbers that never drift

FactValueProven by
Line records60,658data_quality.py (sggs-data), /api/health
Angs1–1430, gap-freegolden_test.py, /api/health
Compositions (comp_id)4,527 distinct; max(comp_id) 5,376; gaps permanent (read from the pinned database)verify_regroup.py --invariants
Vaars22, detected by title headerbuild_vaars.py
Editorial rules / applications4 / 11, all reviewedledger_check.py
Dataset serveddataset.lock.json → commit, sha256, sizemake dataset-check, the scripture-integrity workflow

Read next: Anatomy of a line record.