I've been fascinated with Pāṇini and his language machine for a long time now. For the last 2500
years or so though, scholars have been trying to figure out what the exact algorithm is that
runs this machine and I started my PhD at Cambridge hoping to be able to contribute
to this conversation and to find an answer to this big question but the first couple of
months that I spent at Cambridge were tough I was struggling, I was almost ready to quit and that's
when my supervisor stepped in and said: 'If your solution is too complex you're probably wrong.'
And I took that advice and ran with it, started looking for something which is
simple elegant and effective and that's how I was able to solve this puzzle.
So Pāṇini's remembered in India and actually world over for that matter for being the first
informatician or first linguist who was able to organise the structure of human language
within his grammar in such an elegant beautiful way. So his grammar's got four thousand rules,
it's comprehensive but it's also economical and really well structured optimal and succinct in
its own way. In Pāṇini's grammar to derive any word you start with the base and the affix and
then as you apply a series of rules over very many steps. Two rules become simultaneously applicable
often at the same step of a word derivation. Now the question is which rule do you choose? You
know which of these two do you apply? So Pāṇini has taught us only one rule in his grammar to
help decide which of these two applicable rules should be chosen. Now unfortunately the first
scholar to comment on Pāṇini's grammar Kātyāyana misunderstood this rule. He was familiar with
two possible interpretations of this rule and unfortunately he chose the wrong one
and thereafter all the scholars to write about Pāṇini's grammar, over the last 2500 years
essentially, went ahead with that incorrect interpretation. So the rule in question which
helps us resolve the so-called rule conflict is 1.4.2 vipratiṣedhe paraṁ kāryam. The traditional
interpretation of this rule is that when there is a conflict between two rules of equal strength the
rule that comes later in the serial order of the grammar should be chosen or wins.
Now that of course gives us all kinds of grammatically incorrect forms if we are to
go by that interpretation. I reinterpreted this rule as in the event of such interaction between
two rules at the same step the rule that is applicable to the right part of the word
wins. That has helped us figure out the algorithm that runs this machine, so now when you follow
the correct interpretation of this rule you automatically get the correct answer at the end
of almost all derivations without exception. So now that we've got the algorithm, this very simple
elegant teachable algorithm we can teach the Aṣṭādhyāyī this fantastic grammar to the computer
and I think this is a major milestone not just in the history of human interaction
with machines but also in the intellectual history of India.
So I had spent almost nine months at this point at Cambridge as a PhD student and I had found absolutely
nothing. So I was disappointed, I was despondent I was almost ready to quit and I thought I think
I deserve a break it's summertime let's take some time out let's extract ourselves from the thick
of the problem and just spend some time doing other things because anyway we're not making
much progress are we. So that's exactly what I did I spent a month away from my research I did not
even touch my books for that one month and all I did is uh cook pray meditate swim read other stuff
but nothing related to my work after one month of course begrudgingly I had to go back to the uh to
the department to to see what what I can do about this problem and I entered the room I opened the
first notebook within minutes as I'm flipping the pages the patterns almost reveal themselves to me
almost within seconds I knew that I had what I needed to successfully complete my PhD but more
importantly to solve this absolutely fascinating problem. At least for the first few months after
I made this discovery I had sleepless nights I used to cycle to the library in the middle
of the night just to flip pages you know of the very many books that I've stacked up on my table
just to answer other related questions and to confirm certain things that that I was
thinking about and so on and so forth so that was that was a beautiful period of my life but
uh a lot of hard work had to be done and that's precisely what I did during the rest of my PhD.
So I think this is a great opportunity for India especially India's youth to feel inspired and
realise and and acknowledge the fact that their ancestor Pāṇini, a fantastic genius
a very rare one, a very unique one has produced something so extraordinary so if he could do
it with the limited tools available to him 2500 years ago, we can do some amazing things as well.
So do you want do you want me to say that I actually ended up coming to Sanskrit
accidentally because that's what happened in class eight my mum chose Sanskrit for
me because you got full marks in that and you can't get full marks in other languages should
I say that or should I not?
Yeah I love it I think that's very cute that's nice.