You are on page 1of 19

CNeRG Readi ng Group IIT Kharagpur

-
Astadhyayi of Panini
- - -
Amrith Krishna
M.Tech -2
nd
Year
Guide : Dr. Pawan Goyal
CNeRG Readi ng Group IIT Kharagpur
<symbol> ::= __expression__
<postal-address> ::= <street-address> <zip-part>
<street-address> ::= <house-num> <street-name> <opt-apt-num>
<zip-part> ::= <town-name> "," <state-code> <ZIP-code>
Grammar
Structural rules governing the
composition of clauses, phrases, &
words in any given natural language,
and this field includes morphology,
syntax, and phonology

Ingermann observed that the sutras have the same
structure as that of BNF and suggested to rename `Backus Naur Form'
as `Paniini Backus Naur Form' (1967 ACM Communications).

Formal Grammar
Set of production rules for strings in a
formal language. The rules describe
how to form strings from the
language's alphabet that are valid
according to the language's syntax
CNeRG Readi ng Group IIT Kharagpur
padam(word) ::= subantam(nominal form) | ti_nantam(verbal form)
(supti_nantam padam 1.4.14)
;
subantam (nominal form) ::= pratipadikam (nom stem)sup(nom suff)
pratipadikam(nominal stem) ::= krt (noun derived from a verb)
| taddhita(noun derived from a noun)
| samasa(compound)
| underived pratipadikam(nominal stem)
;
(krttaddhitasamasasca 1.2.46)
samasa(compound) ::= alaukika vigrahah. (Intermediate ling exp)
;
alaukika vigrahah. ::= pratipadikam sup pratipadikam sup
(sahasupa 2.1.4)
;
In 2007, a work from Hyman (2007), which argued that the language generated by Paninis
Grammar is mostly a regular Language
CNeRG Readi ng Group IIT Kharagpur
A -> B / C _ D
CAD -> CBD
A,B,C,D are strings or sets of strings (regular)
Generate RL with acyclicity restriction
Johnsons phonological rules
UL
CSL
CFL
RL
Kiparsky & Penn 2012
Given the specific, fixed grammar that Panini articulated in the Astadhyay, which formal language
class(es) does it belong to?
Given the grammar formalism that Panini used for this grammar, what kind of grammars can we
write in general? That is to say, where does the class of Paninian languages fit within the Chomsky
hierarchy?
Powerful than RL and CFL

Complete as it can generate
any context-sensitive language
Brevity

Oral Tradition
built-in capacity for
disambiguation

No Chomskyan system
possesses this.

Still RL-style analysis
possible, by recasting the
grammar*

Can accept any count
language
CNeRG Readi ng Group IIT Kharagpur

. |
. |
. |
. |
. |











. |
. |
. |
. |
. |











.
|
. |
. |
. |
Alphabets & Shiva Sutras
Where it all starts..



..
Not only Panini was by far the first linguist in recorded history, but I claim he was the first
informaticien, 24 centuries before computers came into existence. Prof. Gerard Huet, Computer Scientist, Inria,
Paris,
CNeRG Readi ng Group IIT Kharagpur

Buffet Managers Dilemma





Total list is of minimal length
Sound list is of minimal length
Anubandha list is of minimal length
Optimally arranged: no rearrangement results in a simpler one
`
n dishes
We take some dishes together (Set)
People with different choices (veg/Nonveg)
A person should find what he needs at a single stretch
Repeated placement of a dish at different locations should be minimal
Minimal markers for sets to be used

CNeRG Readi ng Group IIT Kharagpur
The reasoning from economy goes like this. To be grouped
together in a pratyahara, sounds must make up a continuous
segment of the list. Economy requires making the list as
short as possible, which means avoiding repetitions of
sounds, and using as few markers as possible.
Consequently, if class A properly includes class B, the
elements shared with B should be listed last in A; the marker
that follows can then be used to form pratyaharas for both
A and B. In this way the economy principle, by selecting the
shortest grammar, determines both the ordering of sounds
and the placement of markers among them.
- Kiparsky 1991
CNeRG Readi ng Group IIT Kharagpur

Grammar Structure
RULES
METARULES
LEXICAL LISTS
GRAMMAR
Ashtadhyayi
Unadi Sutras
Dhatupatha
Ganapatha
PHONOLOGICAL LISTS
Panini Paribhasa sutras
Aksharasamnaya

CNeRG Readi ng Group IIT Kharagpur
iko yan. aci (6.1.77)
Ik{6} yan{1} ac{7}
tasmin iti nirdiste purvasya (1.1.65)
A word ending in locative case indicates `of the preeceding'.
sasthisthaneyoga (1.1.48)
A word in genitive case undergoes change
Ik{6} ac{7} ::= yan [1} ac{7}
{i,u,r.,l.} {a,i,u,r.,l.,e,o,ai,au} -> {y,v,r,l} {a,i,u,r.,l.,e,o,ai,au}
Grammar in Action
{i,u,r.,l.} {y,v,r,l} {a,i,u,r.,l.,e,o,ai,au}
A B/C _ D

W{5} W{6} W{7} ->
W{5} W{1} W{7}
[iK] [yN.]/ _[aC]

CNeRG Readi ng Group IIT Kharagpur

Anuvrtti
John goes home.
eats fruits.
John
upadese ac anunasik it 1.3.2
hal antyam 1.3.3
na vibhaktau tusmah. 1.3.4
adih nitud avah 1.3.5
sah pratyayasya 1.3.6
cutu 1.3.7
lasaku ataddhite 1.3.8
upadese (a) it (c)
ac anunasik ( = it)(b)
hal antyam (d)
na vibhaktau tusmah. (=it) (e)
adih (f)
nitudavah (=it) (g)
pratyayasya (h)
sah. (=it) (i)
cutu (=it) (j)
lasaku (=it) ataddhite (k)
a (b + de + f [ g + h f i + j + k g ] ) c
If a == b
step 1
step 2
step 3

CNeRG Readi ng Group IIT Kharagpur
Total Sutras: (3,984) 4,000
Total Words: (7,007) 7,000
Total Words after repeating the words with anuvrtti 40,000
Compression due to anuvr.tti (40,000/7,000 ) 1/6
In terms of byte size, compression 1/3
Anuvrtti
CNeRG Readi ng Group IIT Kharagpur

Data Encapsulation
Dhatupatha
dhhrsa + kta dhhrsta
ni
<rule source="m" target="M rcontext="[@(wb)][@(hal)] ref="A.8.3.23"/>
<mapping name="voicedaspirate"> <map from="@(jaS)" to="@(Jaz)"/> </mapping>
<function name="gunate"> <rule source="[@(a)@(i)@(u)] target="%(guna($1))"/>
<rule source="[@(f)@(x)] target="%(guna($1)) %(semivowel($1))"/></function>

CNeRG Readi ng Group IIT Kharagpur
deriving noun from nouns -- Taddhitha
Dhatus and pratipadikas are treated equally by Panini.
Every rule contains
Morphological
Syntactic
Semantic Specifications
:


(6
th
Case)

Relations
Single Inheritance


:

CNeRG Readi ng Group IIT Kharagpur
(

, ,

1.2.45
( ,

, ,

| 4.1.2
3.1.1.
3.1.2
( ,

, ,

, , root()) +

1.4.102

1.4.103
( ,

, ,

, , root()) +
(

, , , ,

, , root( ))
CNeRG Readi ng Group IIT Kharagpur
1.4.13

1.4.14
( ,

, ,

, , root()) +
(

, , , ,

, , root( )) ()

| 1.4.18
( ,

, ,

, , , ,
root()) + (

, , , ,

, ,
root( )) ()

6.1.87
6.1.101

7.1.54

CNeRG Readi ng Group IIT Kharagpur
( ,

, ,

, , , ,
root()) + (

, , , ,

, ,
(

), - ,- ,root( )) ()

6.4.3

7.3.102
( ,

, ,

, , , ,
root()) + (

, , , ,

, ,
(

), - ,- ,root( ) ()

1.4.110

( ,

, ,

, , , ,
root()) + (

, , , ,

, ,
(

), - ,- ,root( ) (, )
CNeRG Readi ng Group IIT Kharagpur

8.4.2

( ,

, ,

, , , ,
root()) + (

, , , ,

, ,
(

), - ,- ,root( ) (, )

CNeRG Readi ng Group IIT Kharagpur
perhaps the greatest difference between Paninis own formalism and the standard string-
rewriting systems concomitant with Chomskys hierarchy, which is its built-in capacity
for disambiguation. Paninis grammar, through its use of rule precedence and other
meta-conventions, generates a single derivation for every grammatical sentence of
Sanskrit.
- PAUL KIPARSKY,2012
Paninis method of representing hierarchical information in a linear form is an
interesting field of further investigations.
-WIEBKE PETERSEN, 2004
Implement working systems.
Doubles as a tool for learning the concepts of grammar

CNeRG Readi ng Group IIT Kharagpur
References
On Pan.ini and the Generative Capacity of Contextualized Replacement Systems, Gerald Penn,
Paul Kiparsky, COLING 2012,
A Mathematical Analysis of Paninis Sivasutras - Wiebke Petersen JoLLI. 13 (4), p. 471-489
Computer Simulation of Ashtadhyayi: Some insights, Pawan Goyal, Amba Kulkarni and Laxmidhar
Behera. Sanskrit Computational Linguistics: Revised, Selected and Invited Papers, Springer-Verlag. pp.
139-160. (2009)
Modeling Paninian Grammar, Peter M. Scharf, Sanskrit Computational Linguistics: Revised,
Selected and Invited Papers, Springer-Verlag. Pp 95-126
Hyman, M. D. (2007). From Paninian sandhi to finite state calculus. In Huet, G. and Kulkarni, A.,
editors, Proceedings of the First International Symposium on Sanskrit Computational Linguistics,
pages 1321.
:

You might also like