UPDF AI

Rule-Based Sanskrit Parser from Paninis Astadhyayi

D. S. Roy

2025 · DOI: 10.22214/ijraset.2025.70914
International Journal for Research in Applied Science and Engineering Technology · 0 Citations

TLDR

A rule-based framework for parsing Sanskrit sentences by directly leveraging the grammatical rules codified in Pāṇini’s Aṣṭādhyāyī is presented, which generates a parser table derived from Pāṇini’s nearly 4,000 succinct rules.

Abstract

We present a rule-based framework for parsing Sanskrit sentences by directly leveraging the grammatical rules

codified in Pāṇini’s Aṣṭādhyāyī. Our approach generates a parser table – a formal grammar or state-machine representation –

derived from Pāṇini’s nearly 4,000 succinct rules (sūtras). This table forms the backbone of a Sanskrit parser that handles

sandhi (euphonic combination), samāsa (compounding), vibhakti (case and verb inflection), and dhātu (root verb) processing in

an integrated manner. We begin by underscoring the importance of Sanskrit parsing and the suitability of Pāṇini’s grammar for

a rule-based system. A review of existing tools and approaches (e.g., the Sanskrit Heritage Engine, Vidyut-Prakriyā, and

Computational Paninian Grammar frameworks) situates our work in the context of prior scholarship. We then detail our

methodology for translating Pāṇini’s sūtras into a parser table, explaining how the parser applies ordered grammatical rules to

analyze and segment Sanskrit input. The system’s capabilities are illustrated through examples, including a step-by-step parse of

“rāmo’pi gṛham gacchati” (“Rāma also goes home”). In the discussion, we examine the parser’s performance and potential

applications – from computational linguistics to digital humanities – and compare its behavior with existing models. We

conclude by summarizing the contributions of this approach and outlining future directions, such as addressing ambiguity

resolution and extending the framework with statistical methods.