sarvamai/vagartha

Dataset

9

stars

5

commits

Sep 3, 2026

updated

classical-literature
commentary
devanagari
dharmic-texts
indic
sanskrit
shloka

README

वागर्थ · Vāgartha

वागर्थाविव संपृक्तौ वागर्थप्रतिपत्तये ।
जगतः पितरौ वन्दे पार्वतीपरमेश्वरौ ॥

"United as word and meaning are united, I bow to the parents of the world,
Pārvatī and Parameśvara, that I may attain an understanding of word and meaning."

— Kālidāsa, Raghuvaṃśa 1.1

Vāgarthavāk (word) and artha (meaning) — is a corpus of 217,959 Sanskrit verses, each paired with a detailed, structured explanation in English. The name is taken from the invocation above, in which Kālidāsa talks about the inseparability of word and meaning; the dataset's two substantive columns.

The verses span roughly three millennia of Sanskrit literature: the Mahābhārata and Rāmāyaṇa, the eighteen Mahāpurāṇas, the Vedas and Brāhmaṇas, the Upaniṣads and Darśanas, Āyurveda and the Nāṭyaśāstra, kāvya and nāṭaka, lexicons, and Jain, Buddhist and Sikh scripture.

Dataset structure

FieldTypeDescription
sourcestringProvenance of the verse, as a /-delimited taxonomy path or a text name (see Source naming)
shlokastringThe verse itself, in Devanāgarī. Mean 91 characters
explanationstringA structured explanation in Markdown, in English. Mean 4,041 characters

Single train split. 217,959 rows, ~901M characters, 562 MB as Parquet.

The shape of an explanation

Every explanation has three things in order, so the field has a consistent internal structure:

  1. Word-by-word translation — each word in Devanāgarī, its IAST transliteration, its gloss, and its morphological analysis (compound resolution, case, root).
  2. Exact semantic translation — a single close rendering of the verse.
  3. Expanded translation with background and details — situates the verse in its text, then unpacks imagery, poetics, and doctrine.

Example

source: mahabharata

shloka: तथैव स गिरिभूर्यः प्रपुष्पितलताद्रुमः।
        सपक्षिगणसंघुष्टः सश्वापदसरीसृपः॥
### 1. Word by word translation

*   **तथैव** (tathaiva): In that very way; Likewise; Just so.
    (A compound of `tathā` "thus" + `eva` "indeed/very").
*   **स** (sa): That.
*   **गिरिभूर्यः** (giribhūryaḥ): The great mountain; the chief of mountains.
    (A compound of `giri` "mountain" + `bhūryaḥ` "chief/great").
*   **प्रपुष्पितलताद्रुमः** (prapuṣpitalatādrumaḥ): (One) whose creepers (`latā`)
    and trees (`druma`) were in full bloom (`prapuṣpita`).
...

### 2. Exact semantic translation

"In that very way, that great mountain had its creepers and trees in full bloom,
was resounding with the calls of flocks of birds, and was inhabited by wild
beasts and reptiles."

### 3. Expanded translation with additional background and details

... The verse uses a series of long compound adjectives (known as *Bahuvrīhi*
compounds in Sanskrit grammar) to paint a holistic and vivid picture of the
mountain. Each adjective adds a layer to the description, engaging different
senses. ...

Composition

CategoryRowsShareSources
Mahābhārata73,43133.7%3
Purāṇas (18 Mahāpurāṇas)70,79532.5%34
Vālmīki Rāmāyaṇa18,2808.4%1
Upavedas (Āyurveda, Nāṭyaśāstra, …)14,8336.8%48
Upapurāṇas9,4194.3%11
Vedas (Saṃhitās)5,3842.5%36
Darśanas (philosophy)4,5912.1%42
Gītās4,1331.9%84
Kāvya & Nāṭaka4,0801.9%66
Scientific literature3,5351.6%7
Lexicons (koṣa)2,9671.4%9
Brāhmaṇas1,7290.8%19
Vedāṅgas (grammar, śikṣā, nirukta)1,4870.7%37
Smṛtis1,2370.6%3
Upaniṣads8410.4%30
Āraṇyakas5050.2%5
Jain / Buddhist / Sikh scripture3820.2%15
Vedic-studies papers & misc.3300.2%80
Total217,959530

The distribution is heavily skewed: the Mahābhārata and the Mahāpurāṇas together account for two thirds of all rows. Weight or subsample accordingly.

Source naming

source values are normalised. 371 of the 530 sources are /-delimited taxonomy paths, from broad category down to a specific chapter or volume:

upaveda/natyashastra/translation-with-chandrika-notes-by-dr-sudhakar-malaviya/vol-iii
upanishad/main-upanishad/kena/translation-based-on-sanakaras-commentary/by-swami-gambhirananda
vedas/yajur-veda/krishna-yajur-veda/taittiriya/vol-iii/part-i
puranas-18-puranas-mahapurana/garud-puran/garuda-vol-2

The remaining 159 are flat names for standalone texts (mahabharata, valmiki-ramayana, Charakasamhita, Taittiriya_Brahmana_Vol_I), including the Vedic-studies seminar papers, which are named by their title in the language they were written in (DHARANA_A_YOGIC_SCIENCE, वैदिकं_विज्ञानम्).

This makes coarse filtering a prefix match:

puranas = ds.filter(lambda r: r["source"].startswith("puranas-18-puranas-mahapurana/"))
ayurveda = ds.filter(lambda r: r["source"].startswith("upaveda/ayurveda/"))

Provenance

Verses were extracted from digitised editions of the source texts. Explanations were then generated verse-by-verse with gemini-2.5-pro. We run rudimentary checks of the translations, but errors may exist.

Usage

from datasets import load_dataset

ds = load_dataset("sarvamai/vagartha", split="train")
print(ds[0]["shloka"])
print(ds[0]["explanation"])

Streaming, for the 562 MB you may not want to download:

ds = load_dataset("sarvamai/vagartha", split="train", streaming=True)
for row in ds.take(5):
    print(row["source"], row["shloka"])

Limitations

Please read this section before training on the corpus.

  • Explanations are model-generated and unverified. No human scholar reviewed them. They are fluent and mostly sound, but they contain errors of exactly the kind an LLM makes: confident misattribution, invented detail, and occasional grammatical analysis that will not survive a Pāṇinian check. Do not treat this as an authoritative commentary, and do not use it as ground truth for evaluating Sanskrit understanding.
  • source labels are not always right. Verse attribution is inherited from the extraction pipeline, and the pipeline is imperfect. In the very example quoted above, source says mahabharata while the explanation identifies the verse as Rāmāyaṇa, Kiṣkindhā Kāṇḍa — and the explanation is correct. Treat source as a strong hint, not a citation.
  • Duplicate verses were removed, which loses genuine repetition. 959 rows held a verse that appeared elsewhere in the corpus; only the first occurrence was kept. Some of those were extraction artefacts from overlapping editions, but others were real repetition — formulae and refrains recur across the Purāṇas — so the corpus now under-represents how often such verses actually occur.
  • Explanations are English-only, and the register is modern academic. There is no Hindi or other Indic-language explanation, despite several source editions carrying Hindi commentary.
  • No verse-level citation. Rows do not carry canonical references (BhG 2.47), only the source path. Verse order within a source is not guaranteed to be reading order.
  • Coverage is uneven and reflects what was digitised and extractable, not the relative importance of texts. The Ṛgveda contributes fewer rows than a single volume of the Nāṭyaśāstra.

Licence

Released under CC BY 4.0.

The underlying verses are classical works long in the public domain. The explanations are machine-generated derivative text, released under the same terms. Individual source editions and their modern commentaries may carry their own rights; this release covers the verse text and the generated explanations only.

Citation

@misc{vagartha2026,
  title  = {V\={a}gartha: Sanskrit Verses with Structured Explanations},
  author = {Sarvam AI},
  year   = {2026},
  url    = {https://huggingface.co/datasets/sarvamai/vagartha}
}

Contributors

rahular

5 commits

sarvamai/vagartha

Dataset

9

stars

5

commits

Sep 3, 2026

updated

classical-literature
commentary
devanagari
dharmic-texts
indic
sanskrit
shloka

README

वागर्थ · Vāgartha

वागर्थाविव संपृक्तौ वागर्थप्रतिपत्तये ।
जगतः पितरौ वन्दे पार्वतीपरमेश्वरौ ॥

"United as word and meaning are united, I bow to the parents of the world,
Pārvatī and Parameśvara, that I may attain an understanding of word and meaning."

— Kālidāsa, Raghuvaṃśa 1.1

Vāgarthavāk (word) and artha (meaning) — is a corpus of 217,959 Sanskrit verses, each paired with a detailed, structured explanation in English. The name is taken from the invocation above, in which Kālidāsa talks about the inseparability of word and meaning; the dataset's two substantive columns.

The verses span roughly three millennia of Sanskrit literature: the Mahābhārata and Rāmāyaṇa, the eighteen Mahāpurāṇas, the Vedas and Brāhmaṇas, the Upaniṣads and Darśanas, Āyurveda and the Nāṭyaśāstra, kāvya and nāṭaka, lexicons, and Jain, Buddhist and Sikh scripture.

Dataset structure

FieldTypeDescription
sourcestringProvenance of the verse, as a /-delimited taxonomy path or a text name (see Source naming)
shlokastringThe verse itself, in Devanāgarī. Mean 91 characters
explanationstringA structured explanation in Markdown, in English. Mean 4,041 characters

Single train split. 217,959 rows, ~901M characters, 562 MB as Parquet.

The shape of an explanation

Every explanation has three things in order, so the field has a consistent internal structure:

  1. Word-by-word translation — each word in Devanāgarī, its IAST transliteration, its gloss, and its morphological analysis (compound resolution, case, root).
  2. Exact semantic translation — a single close rendering of the verse.
  3. Expanded translation with background and details — situates the verse in its text, then unpacks imagery, poetics, and doctrine.

Example

source: mahabharata

shloka: तथैव स गिरिभूर्यः प्रपुष्पितलताद्रुमः।
        सपक्षिगणसंघुष्टः सश्वापदसरीसृपः॥
### 1. Word by word translation

*   **तथैव** (tathaiva): In that very way; Likewise; Just so.
    (A compound of `tathā` "thus" + `eva` "indeed/very").
*   **स** (sa): That.
*   **गिरिभूर्यः** (giribhūryaḥ): The great mountain; the chief of mountains.
    (A compound of `giri` "mountain" + `bhūryaḥ` "chief/great").
*   **प्रपुष्पितलताद्रुमः** (prapuṣpitalatādrumaḥ): (One) whose creepers (`latā`)
    and trees (`druma`) were in full bloom (`prapuṣpita`).
...

### 2. Exact semantic translation

"In that very way, that great mountain had its creepers and trees in full bloom,
was resounding with the calls of flocks of birds, and was inhabited by wild
beasts and reptiles."

### 3. Expanded translation with additional background and details

... The verse uses a series of long compound adjectives (known as *Bahuvrīhi*
compounds in Sanskrit grammar) to paint a holistic and vivid picture of the
mountain. Each adjective adds a layer to the description, engaging different
senses. ...

Composition

CategoryRowsShareSources
Mahābhārata73,43133.7%3
Purāṇas (18 Mahāpurāṇas)70,79532.5%34
Vālmīki Rāmāyaṇa18,2808.4%1
Upavedas (Āyurveda, Nāṭyaśāstra, …)14,8336.8%48
Upapurāṇas9,4194.3%11
Vedas (Saṃhitās)5,3842.5%36
Darśanas (philosophy)4,5912.1%42
Gītās4,1331.9%84
Kāvya & Nāṭaka4,0801.9%66
Scientific literature3,5351.6%7
Lexicons (koṣa)2,9671.4%9
Brāhmaṇas1,7290.8%19
Vedāṅgas (grammar, śikṣā, nirukta)1,4870.7%37
Smṛtis1,2370.6%3
Upaniṣads8410.4%30
Āraṇyakas5050.2%5
Jain / Buddhist / Sikh scripture3820.2%15
Vedic-studies papers & misc.3300.2%80
Total217,959530

The distribution is heavily skewed: the Mahābhārata and the Mahāpurāṇas together account for two thirds of all rows. Weight or subsample accordingly.

Source naming

source values are normalised. 371 of the 530 sources are /-delimited taxonomy paths, from broad category down to a specific chapter or volume:

upaveda/natyashastra/translation-with-chandrika-notes-by-dr-sudhakar-malaviya/vol-iii
upanishad/main-upanishad/kena/translation-based-on-sanakaras-commentary/by-swami-gambhirananda
vedas/yajur-veda/krishna-yajur-veda/taittiriya/vol-iii/part-i
puranas-18-puranas-mahapurana/garud-puran/garuda-vol-2

The remaining 159 are flat names for standalone texts (mahabharata, valmiki-ramayana, Charakasamhita, Taittiriya_Brahmana_Vol_I), including the Vedic-studies seminar papers, which are named by their title in the language they were written in (DHARANA_A_YOGIC_SCIENCE, वैदिकं_विज्ञानम्).

This makes coarse filtering a prefix match:

puranas = ds.filter(lambda r: r["source"].startswith("puranas-18-puranas-mahapurana/"))
ayurveda = ds.filter(lambda r: r["source"].startswith("upaveda/ayurveda/"))

Provenance

Verses were extracted from digitised editions of the source texts. Explanations were then generated verse-by-verse with gemini-2.5-pro. We run rudimentary checks of the translations, but errors may exist.

Usage

from datasets import load_dataset

ds = load_dataset("sarvamai/vagartha", split="train")
print(ds[0]["shloka"])
print(ds[0]["explanation"])

Streaming, for the 562 MB you may not want to download:

ds = load_dataset("sarvamai/vagartha", split="train", streaming=True)
for row in ds.take(5):
    print(row["source"], row["shloka"])

Limitations

Please read this section before training on the corpus.

  • Explanations are model-generated and unverified. No human scholar reviewed them. They are fluent and mostly sound, but they contain errors of exactly the kind an LLM makes: confident misattribution, invented detail, and occasional grammatical analysis that will not survive a Pāṇinian check. Do not treat this as an authoritative commentary, and do not use it as ground truth for evaluating Sanskrit understanding.
  • source labels are not always right. Verse attribution is inherited from the extraction pipeline, and the pipeline is imperfect. In the very example quoted above, source says mahabharata while the explanation identifies the verse as Rāmāyaṇa, Kiṣkindhā Kāṇḍa — and the explanation is correct. Treat source as a strong hint, not a citation.
  • Duplicate verses were removed, which loses genuine repetition. 959 rows held a verse that appeared elsewhere in the corpus; only the first occurrence was kept. Some of those were extraction artefacts from overlapping editions, but others were real repetition — formulae and refrains recur across the Purāṇas — so the corpus now under-represents how often such verses actually occur.
  • Explanations are English-only, and the register is modern academic. There is no Hindi or other Indic-language explanation, despite several source editions carrying Hindi commentary.
  • No verse-level citation. Rows do not carry canonical references (BhG 2.47), only the source path. Verse order within a source is not guaranteed to be reading order.
  • Coverage is uneven and reflects what was digitised and extractable, not the relative importance of texts. The Ṛgveda contributes fewer rows than a single volume of the Nāṭyaśāstra.

Licence

Released under CC BY 4.0.

The underlying verses are classical works long in the public domain. The explanations are machine-generated derivative text, released under the same terms. Individual source editions and their modern commentaries may carry their own rights; this release covers the verse text and the generated explanations only.

Citation

@misc{vagartha2026,
  title  = {V\={a}gartha: Sanskrit Verses with Structured Explanations},
  author = {Sarvam AI},
  year   = {2026},
  url    = {https://huggingface.co/datasets/sarvamai/vagartha}
}

Contributors

rahular

5 commits