What was Pāṇini’s ancient algorithm in verse? Abhishek Avtans explains
The great Sanskrit scholar, who lived in the 5th century BCE, composed one of the most comprehensive and sophisticated grammar algorithms in history. The Aṣṭādhyāyī is capable of generating an infinite number of well-formed Sanskrit expressions, if one feeds in base words and then follows the rules as applicable.
In an apocryphal tale, a verse from the Pañcatantra tells of how Pāṇini was killed by a lion while engrossed in teaching his pupils grammatical derivations in Sanskrit. Such was his dedication.
The great Sanskrit grammarian, who lived in the 5th century BCE, was born near present-day Lahore. Pāṇini was a family name. Ancient sources suggest that his first name was Āhika or Śālanki.
Now, at some point, Pāṇini composed one of the most comprehensive and sophisticated grammar algorithms in the history of linguistics: Aṣṭādhyāyī, made up of eight (aṣṭā) chapters (adhyāya), together containing 4,000 rules in the form of sūtras (aphorisms in verse).
These sūtras discuss aspects of phonology, semantics, morphology, the classification of verbal and nominal roots and their application to the Sanskrit language.
The Aṣṭādhyāyī is capable of generating an infinite number of well-formed Sanskrit expressions, if one feeds in base words and then follows the rules as applicable.
All the rules are interrelated; the Aṣṭādhyāyī was composed so as to maximise economy of expression. In fact, brevity was so prized by ancient Indian grammarians that there is a verse about how they rejoice as much over the saving of the length of half a short vowel as over the birth of a son (ardhamātrā lāghavena putrotsavam manyante vaiyākaraṇāḥ).
Many of the sūtras are therefore elliptical and must be paired with others from the set, as needed. Taking an example from English, one Pāṇini-style sutra might explain the formation of plurals thus: “The plural of a (count) noun is formed by adding s.” A later rule might just state: “But of man, men.”
The rule that the scholar Rishi Rajpopat has just re-analysed, as part of his PhD at Cambridge University, was a metarule about conflict resolution between two rules of equal strength and relevance. This metarule (numbered 1.4.2) was traditionally understood as: when rules of equal force conflict, apply the rule which is subsequent in order.
Great linguists and philosophers such as Kātyāyana (2nd century BCE), Patañjali (c. 3rd century CE), and Bhartṛhari (6th century CE) have discussed this rule in their commentaries on the Aṣṭādhyāyī. Later linguists and scholars tried to create sub-meta rules and lists of “exceptions” to make it work. The results were far from satisfactory.
Rajpopat’s interpretation of Pāṇini’s rule now adds fresh perspective: pick the rule that applies to the right hand side of the word.
Using an example from English, here’s what that would mean. Say the question is how to add a suffix to make a noun plural. One rule says: Add ‘s’. Another rule says: Some suffixes such as -ment must be added before adding other suffixes. Prioritise the first of these rules, and one ends up with “commitsment”, which is unacceptable; but “commitments” is perfect.
This new interpretation of metarule 1.4.2 offers renewed hope for the use of the Pāṇinian approach in natural language processing and artificial intelligence. It could also change how the world views, studies and deploys the scientific beauty of Sanskrit.
(Abhishek Avtans is a lecturer of Indic languages at Leiden University in the Netherlands)