Skip to main content

How Machines Read Sanskrit

Before you can look a Sanskrit word up, you have to find its boundaries: continuous sandhi and productive compounding mean a printed line rarely shows you the dictionary headword directly. Human readers learn to undo this (the guides' sandhi and compound quizzes train exactly that); machines have to do it algorithmically, and their independent readings are a useful cross-check when you doubt your own segmentation of a compound.

The Sanskrit Heritage Platform

The oldest and most rigorous of these machines is Gérard Huet's Sanskrit Heritage Platform (INRIA, Paris): a finite-state segmenter (it enumerates the possible sandhi-consistent splits of a phrase), a morphology generator (every inflected form of its lexicon, derivationally justified), and a hypertext Sanskrit–French dictionary (DICO) knitting them together. Where a Cologne dictionary records words, Heritage constructs them — which is precisely why it is an independent check: if Heritage can segment and inflect your compound, the analysis is grammatically derivable, not just attested.

How much of MW does the machine know?

The entry-level crosswalk between Monier-Williams and the Heritage lexicon gives a measured answer: 25,140 of 185,803 MW entries (13.5%) have a Heritage article. That is not a defect — Heritage is a curated, generative lexicon built to segment real text, not an exhaustive record of the tradition; frequent vocabulary is far better covered than the long tail. Coverage by headword initial:

InitialMW entriesHeritage-coveredCoverage
a-17,7642,86516.1%
ā-4,23087420.7%
i-89913314.8%
u-5,10794918.6%
-5035410.7%
e-86814216.4%
k-12,2081,71614.1%
kh-95713814.4%
g-4,59963113.7%
gh-6698212.3%
c-3,27847814.6%
j-3,08946415.0%
t-5,08672614.3%
d-7,47694612.7%
dh-2,26329713.1%
n-7,9661,14114.3%
p-20,2462,82113.9%
ph-5215410.4%
b-3,89543811.2%
bh-4,41055412.6%
m-10,6751,27511.9%
y-3,07936812.0%
r-5,17658311.3%
l-2,61334513.2%
v-17,8552,28912.8%
ś-9,8631,08711.0%
-6017712.8%
s-24,0592,86711.9%
h-3,53139611.2%

Initials with at least 500 MW entries (29 of 46 initials). Overall: 25,140 of 185,803 MW entries (13.5%) have a Heritage dictionary article. Shaded = notably above / below the mean.

The initials that lead — ā- (20.7%), u- (18.6%), a- (16.1%) — are where preverb-derived and high-frequency vocabulary concentrates; rare-initial and tail-heavy stretches sit near 10%.

From a frequent word to its machine reading

Joining the corpus attestation layer to the crosswalk shows the intended use: for the words you actually meet, Heritage usually has an article with full morphology behind it.

DCS frequency rankLemmaHeritage article
2tad (tad)DICO/28.html#tad
5eva (eva)DICO/17.html#eva
6yad (yad)DICO/53.html#yad
7iti (iti)DICO/11.html#iti
8tvad (tvad)DICO/30.html#tvad
9idam (idam)DICO/11.html#idam
11api (api)DICO/4.html#api
12kṛ (kf)DICO/22.html#k.r#1
13bhū (BU)DICO/47.html#Ubhuu
14sarva (sarva)DICO/69.html#sarva
15vac (vac)DICO/57.html#vac
16mahat (mahat)DICO/50.html#mahat
17as (as)DICO/7.html#as#1
18etad (etad)DICO/17.html#etad
19tathā (taTA)DICO/28.html#tathaa

Anchors resolve inside the Heritage_Resources GitHub mirror's DICO/ hypertext dictionary (the live INRIA site blocks automated access — always use the mirror).

The wider machine ecosystem

Heritage is one of several independent machine readers of Sanskrit — each with a different theory of the language, which is what makes cross-checking informative:

  • vidyut / Ambuda (MIT-licensed) — a Pāṇinian generator: it derives forms by grammar rule (prakriyā), so it can show its work step by step. Already reused in this project's WhitneyRoots for verb-paradigm display.
  • DharmaMitra (Berkeley) — neural translation + GPU-scale morphology and lemmatization. Its services expose no bulk-download license, so this project consumes DharmaMitra-derived data only through committed csl-atlas artifacts, and links rather than mines the site.
  • Saṃsādhanī (Amba Kulkarni, University of Hyderabad) — a full computational-linguistics stack with gold-standard treebanks; its datasets currently ship without a LICENSE file, so they are validation-only for us until upstream clarifies.
  • The Digital Corpus of Sanskrit itself is the fourth reader: every corpus count on the attestation page rests on a human-validated machine analysis of running text.

When two of these systems agree on a segmentation, trust it; when they disagree, you have found either a genuinely ambiguous compound or the edge of one system's lexicon — both worth knowing before you cite a dictionary entry.

Trust block
  • Evidence: src/data/heritage-coverage.json (overall + per-initial coverage + a 200-lemma frequency-joined sample), regenerated by scripts/build-heritage-coverage.mjs from the entry-level MW↔Heritage crosswalk mw_heritage_crosswalk.tsv (H099, 03-07-2026). All numbers on this page are computed from the committed feed at build time.
  • Limitations: coverage is measured at the entry level against MW key1 — a Heritage article may exist under a variant stem the crosswalk did not match, so 13.5% is a lower bound. The sample links resolve inside the Heritage_Resources GitHub mirror (03-2025 snapshot), not the live site — the live INRIA services block automated access, and GitHub's blob view does not honor in-page anchors, so links open the file, not the exact entry.
  • Rights: the feed carries aggregate statistics over our own derived crosswalk only; redistribution of the LGPLLR mirror's raw data is a separate, still-open question deliberately not exercised here (evidence record §2 in NON_COLOGNE_SOURCES.md).
  • Owner repos: Heritage Platform (upstream) → SanskritLexicography (crosswalk; deeper reuse staged in its HERITAGE_INRIA_ROADMAP.md) → this repo (rendering).
  • Built by: Fable 5 (claude-fable-5), 07-07-2026, handoff H280.

See also