400 likes | 742 Views
Amba Kulkarni Department of Sanskrit Studies University of Hyderabad Hyderabad ambapradeep@gmail.com. P āņ ini's Ash ţā dhy ā y ī : A Computer Scientist's Perspective. Circa 500 B.C.E. Extant Grammar of the then prevalent Sanskrit Language Around 4000 sutras; 8 chapters 4 sections each.
E N D
Amba Kulkarni Department of Sanskrit Studies University of Hyderabad Hyderabad ambapradeep@gmail.com Pāņini's Ashţādhyāyī: A Computer Scientist's Perspective 4th APCAP Dec 5th 2008, NIAS Bangalore
Circa 500 B.C.E. Extant Grammar of the then prevalent Sanskrit Language Around 4000 sutras; 8 chapters 4 sections each Pāņini's Ashţādhyāyī 4th APCAP Dec 5th 2008, NIAS Bangalore
Information Theory: Shannon Computational Linguists: (Language: Means of coding the information.) Information Coding: How much, Where and How Programming Languages: Concepts, Techniques and Models A Computer Scientist 4th APCAP Dec 5th 2008, NIAS Bangalore
Pāņini's Ashţādhyāyī has something to offer to each of these fields Pāņini's Ashţādhyāyī 4th APCAP Dec 5th 2008, NIAS Bangalore
Claim: Panini was aware of the strength of language as an information coding device. Evident from a) His style of presenting the information in sUtra b) His analysis of Sanskrit Language Information Coding 4th APCAP Dec 5th 2008, NIAS Bangalore
Brevity Kiparsky: Panini used Brevity to achieve generalisation. – Maximum Use of anuvŗtti Ramwent home. Ramate an apple. ---------------------------------------------- Ramwent home, ate an apple. Information Theory 4th APCAP Dec 5th 2008, NIAS Bangalore
upadeSe ac anunAsika it 1.3.2 hal antyam 1.3.3 na vibhaktau tusmA 1.3.4 Adi ~nitudavAH 1.3.5 .saH pratyayasya 1.3.6 CutU 1.3.7 laSaku ataddhite 1.3.8 Anuvŗtti 4th APCAP Dec 5th 2008, NIAS Bangalore
upadeSe ac anunAsika (=it) 1.3.2 hal antyam 1.3.3 na vibhaktau tusmA (=it)1.3.4 Adi ~nitudavAH (=it)1.3.5 pratyayasya .saH (=it)1.3.6 CutU (=it)1.3.7 ataddhite laSaku (=it)1.3.8 Anuvŗtti … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
upadeSe(a) ac anunAsika(b)(=it)(c)1.3.2 hal antyam(d)1.3.3 na vibhaktau tusmA(e)(=it)1.3.4 Adi(f) ~nitudavAH(g)(=it)1.3.5 pratyaya(h)sya(i) .saH(j)(=it)1.3.6 CutU(k)(=it)1.3.7 ataddhite laSaku(l)(=it)1.3.8 Anuvŗtti … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
a b c d e c f gc h_i j c k c l c a (b + de + f [g+ h_i{j + k + l }]) c Anuvŗtti … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
No Proper Nesting; MandUka pluti: Ad(a) guNaH(b) 6.1.84 v.rddhiH(c) eci(d){a} 6.1.85 etyedhatyUTsu (e) {a c d} 6.1.86 upasargAt(f)ŗti(g)dhAtO(h){a c}6.1.87 VA supyApiSale(i){f g h a c} 6.1.88 OtaH amSasoH(j) 6.1.89 e”ni(k) pararUpaM(l){ f h a} 6.1.90 a{b + c[d(1+e) + fh(g(1 + i)] + j + kl)} Anuvŗtti … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Maximum advantage of features of Natural Language: How are the complete phrases reconstructed? AkAnksha (Expectancy): Major role in deciding the anuvŗtti Anuvŗtti … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Example of borrowing from as many as 11 sūtras Original sūtra: 3-3-65 क्वणः वीणायां च After anuvŗtti: 3-3-65: क्वणः वीणायां च प्रत्ययःपरः चआद्युदात्तः चधातोःकृत्क्रियायां क्रियार्थायाम् भावे अकर्तरि च कारके सञ्ज्ञायाम् अप्उपसर्गे वानौ(anuvŗtti from 11 different sūtras) Anuvŗtti … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Some Statistics: Total sūtras : (3984) 4000 Total Words (with sandhi): (7007) 7000 Total Sandhi split words: 9843 Total words after repeating the words with anuvŗtti: 40,000 Compression because of anuvŗtti: 1/6 In terms of byte size, compression is 1/3. Anuvŗtti … Contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Normal Arrangement of Alphabet a A i I u U ŗļ e E o O M H k kh g gh “n c ch j jh ~n ţ ţh .d .dh .n t th d dh n p ph b bh m y r l v S ş s h Information Theory 4th APCAP Dec 5th 2008, NIAS Bangalore
Panini required several(42) subsets of this alphabet to describe various operations. ShivasUtra 4th APCAP Dec 5th 2008, NIAS Bangalore
Some of these subsets: All vowels All consonants All vowels + semivowels h y v r l + consonants y v r l + consonants v r l + consonants r l + consonants ShivasUtra 4th APCAP Dec 5th 2008, NIAS Bangalore
It is not advisable to give 42 names to these sets. It will be difficult to memorize the association. These are Partially ordered sets. Panini arranged them linearly in the form of 14 ShivasUtras. ShivasUtra 4th APCAP Dec 5th 2008, NIAS Bangalore
4th APCAP Dec 5th 2008, NIAS Bangalore a i u N ŗļK e o c E O “N h y v r T l N ň m “n N n M Jh bh Ň gh .dh dh Ş j b g .d d S kh ph ch .th th c .t t V k p Y SŞ s R h L S H I V A S U T R A S
Optimality of these sUtras is proved independently by Kiparsky (linguistically) and Petersen (mathematically) ShivasUtras .. contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Given a set of Partially Ordered sets, Now it is possible to tell Whether the elements are Shivasutra encodable or not. Ref: Petersen(2008) ShivasUtras ... contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Information Theory: Deals with Measure of information, data compression, etc. Information Dynamics: Focuses on flow of information in a language Information Dynamics 4th APCAP Dec 5th 2008, NIAS Bangalore
For a Computer Scientist working in NLP Where a language codes the information How it codes the information How much information it codes are important. Information Dynamics 4th APCAP Dec 5th 2008, NIAS Bangalore
Where a language codes information: Useful to decide the parsing Strategy Information Dynamics … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
How a language codes information: Useful to decide whether the information can be passed on to other language without any efforts or not Information Dynamics … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
How much information a language codes: Useful to decide whether the desired information can be extracted or not merely from a language string without appealing to the extra linguistic knowledge. Information Dynamics … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Where: anabhihite 3.1.1 How much: svatantraH kartA 1.4.54 How (the manner): samAna kartŗkayoH pUrvakAle 3.4.21 Information Dynamics … Contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Data + Algorithm = Program Algorithm: Around 4000 sUtras Data: Shivasutra gaNapAtha DhAtupAtha uNAdi sUtra li”ngAnuSAsana Programming Languages 4th APCAP Dec 5th 2008, NIAS Bangalore
Data + Algorithm = Program Object Oriented Programming: Encapsulation of data with the (markers to the) functions Bhaj + (gh)a(~n) : Presence of gh => j->g Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Ordering of rules: Two meta rules a) viprati.sedhe param kAryam 1.4.2 (In case of conflict apply the later rule) b) pUrvatra asiddham 8.2.1 (Apply the rules in last 3 sections at the end and in linear order) Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Typical VaiyAkara.na's view: Event driven Programming Changes in the Data spaces: Event ==> Triggers the rules Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Typical vaiakara.nas view: Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Control: Certain rules block certain other rules. Blocking is of 3 different types a) Partial blocking (asiddhavat) b) certain rules are not applicable (asiddhaH) c) only certain rules are applicable (asiddham) (direct implication on : passing of parameters) Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Partial Blocking: Asiddhavat atra AbhAt Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Ordering of the sUtras Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Control: a) If X then Y (mA.thara kau.ndi.nya nyAya) b) If X then Y else Z (takra kau.ndi.nya nyAya) c) If (not X) then Y (ni.sedha) d) if X then (Y and Z) (vibhA.sA) Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Conflict Resolution: Utsarga / apavAda General / special rule Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Use of Special Features of Sanskrit Use of Vibhaktis (case markers) Order of parameters in a function IkaH ya.n aci Ik ac → ya.n ac Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Use of Special Features of Sanskrit Use of Pronouns as variables Tasmin iti nirdis.te pUrvasya TasmAt iti uttarasya Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore
Inheritance Multiple inheritance → arranged as a linear inheritance Taddhita pratyaya Ashwini Deo 2007 Programming Languages … contd 4th APCAP Dec 5th 2008, NIAS Bangalore