arXiv:2608.25038cs.CLAug 2026

Manuscript Offprint

arXiv:2608.25038

Padamitra: Grounded Glossary Generation for Classical Sanskrit

Manoj Balaji Jagadeeshan, Sai Pragnaan Marala, Pawan Goyal

Abstract

We introduce grounded glossary generation, a structured task requiring models to recover semantically meaningful Sanskrit phrases and produce translation-grounded meanings from a šloka - translation pair, formalizing the traditional pātha commentary practice as an evaluable NLP objective. We construct a benchmark of 31,316 šloka - translation glossary triples from the Vālmiki Rāmāyaṇa and Śrīmad Bhāgavatam, paired with two metrics: Jaccard for phrase recovery and Meaning Faithfulness for semantic consistency. Across zero-shot, few-shot, and instruction fine-tuned variants of Gemma-3n-E4B, Gemma-3-12B, Phi-4, and Qwen3.5-9B, instruction fine-tuning substantially outperforms prompting, while explicit segmentation yields gains. Error analysis identifies over-segmentation of sandhi and samāsa compounds as the dominant failure mode, pointing to morphological modeling as the key bottleneck for faithful Sanskrit lexical decomposition. Data 1^{1} and Code 2^{2} are available.

1 Introduction

Classical Sanskrit literature poses significant challenges for interpretation due to its morphological richness and flexible syntax. In particular, phonological fusion across word boundaries (sandhi) and systematic nominal compounding (samāsa) often produce surface forms whose segmentation into semantically meaningful units is itself a non-trivial task (Huet et al., 2009; Hellwig and Nehrdich, 2018). Classical commentators addressed this through pātha commentary - a glossary-like annotation that maps each resolved phrase in a verse (šloka) to its contextual meaning - a tradition that underlies modern pedagogi-

Figure

Figure 1: Grounded glossary generation. From a šloka-translation pair, the model recovers sandhi- and samāsa-resolved Sanskrit phrases and assigns each a meaning grounded in the provided translation, yielding a structured glossary.

cal resources such as the IITK Valmiki Rāmāyaṇa 3^{3} and Vedabase 4^{4}. We formalize this tradition as grounded glossary generation: given a Sanskrit šloka s and its authoritative English translation t, the task is to produce a structured glossary G={(ki,vi)}i=1m\mathcal{G} = \{(k_i, v_i)\}_{i=1}^m, where each key kik_i is a semantically coherent Sanskrit phrase and each value viv_i is a meaning grounded in t. Crucially, grounding in the translation distinguishes this task from unconstrained lexicographic gloss generation: the meanings must be faithful to the provided translation, not merely plausible in isolation. This formulation makes interpretable lexical decomposition an explicit, evaluable objective rather than an opaque by-product of end-to-end translation.

Prior work in Sanskrit NLP has largely targeted individual sub-problems: sandhi splitting, morphological analysis, and segmentation (Huet et al., 2009; Kulkarni and Shukl, 2009; Krishna et al., 2017; Hellwig and Nehrdich, 2018); cross-lingual retrieval (Jagadeeshan et al., 2025); entity resolution (Sarkar et al., 2025); anvaya (Kr

1^{1}https://huggingface.co/collections/sanganaka/padamitra-glossary-generation

2^{2}https://github.com/sanganaka-iitkgp/Padamitra-Glossary-Generation

3^{3}https://valmiki.iitk.ac.in

4^{4}https://vedabase.io/en/library/sb/ ishna et al., 2019; Das et al., 2025); and po￾etry generation (Jagadeeshan et al., 2026a,b); Kr￾ishna et al. (2020) address several of these jointly in a single graph-based framework. Related work has also explored Sanskrit dependency pars￾ing (Kulkarni and Shukl, 2009), Sanskrit–English neural machine translation (Aralikatte et al., 2021; Nehrdich et al., 2026), multilingual LLMs for low-resource languages (Ahuja et al., 2023), and bilingual word alignment using FastAlign (Dyer et al., 2013). However, no prior work directly ad￾dresses grounded phrase-level glossary generation as a unified task combining segmentation, seman￾tic grounding, and lexicographic faithfulness. Four gaps motivate this work. First, token-level aligners such as FastAlign cannot model San￾skrit’s fusional morphology, where one surface token may span several glossary keys. Second, instruction-tuned LLMs handle structured predic￾tion well via in-context learning (Brown et al., 2020; Wei et al., 2022), but their behavior on a task coupling sandhi resolution, boundary de￾tection, and translation-grounded meaning assign￾ment is untested. Third, MT metrics such as BLEU (Papineni et al., 2002) and chrF (Popovic´, 2015) measure sentence-level fluency, not phrase￾level key recovery or per-entry semantic faithful￾ness. Fourth, whether explicit segmentation super￾vision helps over end-to-end learning is unestab￾lished. We address these gaps with a benchmark of 31,316 sloka ´ –translation–glossary triples from the Valm¯ ¯ıki Ram¯ ayan ¯ . a and Sr´ ¯ımad Bhagavatam, and ¯ two metrics: Jaccard for glossary key recov￾ery and Meaning Faithfulness for translation￾grounded semantic consistency. Across zero￾shot, few-shot, and instruction fine-tuned vari￾ants of gemma-3n-E4B-it, gemma-3-12b-it, phi-4 (14B), and Qwen3.5-9B, instruction fine￾tuning (IFT) substantially outperforms prompt￾ing. Ablations show that predicted segmentation adds little, though gold segmentation raises Mean￾ing Faithfulness from 0.787 to 0.872, and that IFT models degrade under word-order perturba￾tion. Error analysis identifies over-segmentation of sandhi and samasa ¯ compounds as the dominant failure mode. 2 Problem Statement Given a Sanskrit sloka(s) and its English transla- ´ tion (t), the goal is to generate a grounded glossary G = (ki , vi) m i=1 where each ki is a semantically meaningful Sanskrit phrase and vi is its meaning grounded in the translation (t). Unlike machine translation (Koehn et al., 2003), which targets fluent output over automatically induced phrase pairs, bilingual lexicon induc￾tion (Lample et al., 2018; Artetxe et al., 2017), which derives word-level equivalents from corpus￾level statistics, or definition modeling (Noraset et al., 2017), which generates context-free glosses, grounded glossary generation jointly requires re￾covering morphologically complex phrase bound￾aries and producing meanings faithful to a spe￾cific provided translation. The generated glossary must remain grounded in the provided translation, capturing interpretable lexical units as structured phrase-meaning pairs while avoiding unsupported or hallucinated interpretations. Example Illustration Sanskrit sloka: ´ नैिमषेऽिनिमषक्षेत्रे ऋषय: शौनकादय: । सत्रं स्वगार्यलोकाय सहस्रसममासत ॥ English Translation: Once, in a holy place in the forest of Naimis. aran ¯ . ya, great sages headed by the sage Saunaka assembled ´ to perform a great thousand-year sacrifice for the sat￾isfaction of the Lord and His devotees. Glossary: नैिमषे → in the forest known as Naimis. aran ¯ .ya अिनिमष-क्षेत्रे→ the spot which is especially a favorite of Vis.n. u (who does not close His eyelids) ऋषयः → sages शौनक-आदयः → headed by the sage Saunaka ´ सत्रम्→ sacrifice स्वगार्य → the Lord who is glorified in heaven लोकाय → and for the devotees who are al￾ways in touch with the Lord सहस्र → one thousand, समम्→ years आसत → performed. 3 Dataset 3.1 Data Sources The dataset is curated from two publicly avail￾able educational resources: Ram¯ ayan ¯ . a and Sr´ ¯ımad Bhagavatam, and use it for research purposes. ¯ Each instance contains: (Sanskrit sloka, English translation, a glossary mapping ´ Sanskrit phrases) 3.2 Data Preparation We parse semi-structured glossary annotations into structured key-value dictionaries and apply light normalization, including Unicode and whites￾pace normalization, while preserving the original linguistic structure of the text. The dataset is divided into train, validation, and test splits: Train: 25,050, Validation: 3,133, Test: 3,133.

To reduce leakage, contiguous verses and near-duplicate glossary entries are prevented from appearing across splits. Overlapping gloss key between Train, Validation and Test is shown in Table 6.