Pinis Ashdhyy A Computer Scientists Perspective Amba Kulkarni
Pāņini's Ashţādhyāyī: A Computer Scientist's Perspective Amba Kulkarni Department of Sanskrit Studies University of Hyderabad ambapradeep@gmail. com 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Pāņini's Ashţādhyāyī Circa 500 B. C. E. Extant Grammar of then prevalent Sanskrit Language Around 4000 sutras; 8 chapters 4 sections each 4 th APCAP Dec 5 th 2008, NIAS Bangalore
A Computer Scientist Information Theory: Shannon Computational Linguists: (Language: Means of coding the information. ) Information Coding: How much, Where and How Programming Languages: Concepts, Techniques and Models 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Pāņini's Ashţādhyāyī has something to offer to each of these fields 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Coding Claim: Panini was aware of the strength of language as an information coding device. Evident from a) His style of presenting the information in s. Utra b) His analysis of Sanskrit Language 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Theory Brevity Kiparsky: Panini used Brevity to achieve generalisation. – Maximum Use of anuvŗtti Ram went home. Ram ate an apple. -----------------------Ram went home, ate an apple. 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Anuvŗtti upade. Se ac anun. Asika it 1. 3. 2 hal antyam 1. 3. 3 na vibhaktau tusm. A 1. 3. 4 Adi ~nitudav. AH 1. 3. 5. sa. H pratyayasya 1. 3. 6 Cut. U 1. 3. 7 la. Saku ataddhite 1. 3. 8 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Anuvŗtti … contd upade. Se ac anun. Asika (=it) hal antyam na vibhaktau tusm. A (=it) Adi ~nitudav. AH (=it) pratyayasya. sa. H (=it) Cut. U (=it) ataddhite la. Saku (=it) 1. 3. 2 1. 3. 3 1. 3. 4 1. 3. 5 1. 3. 6 1. 3. 7 1. 3. 8 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Anuvŗtti … contd upade. Se(a) ac anun. Asika(b) (=it)(c) hal antyam(d) na vibhaktau tusm. A(e) (=it) Adi(f) ~nitudav. AH(g) (=it) pratyaya(h)sya(i). sa. H(j) (=it) Cut. U(k) (=it) ataddhite la. Saku(l) (=it) 4 th APCAP Dec 5 th 2008, NIAS Bangalore 1. 3. 2 1. 3. 3 1. 3. 4 1. 3. 5 1. 3. 6 1. 3. 7 1. 3. 8
Anuvŗtti … contd a bc d ec f gc h_i jc kc lc a (b + de + f [g + h_i{j + k + l }]) c 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Anuvŗtti … contd No Proper Nesting; Mand. Uka pluti: Ad(a) gu. Na. H(b) 6. 1. 84 v. rddhi. H(c) eci(d) {a} 6. 1. 85 etyedhaty. UTsu (e) {a c d} 6. 1. 86 upasarg. At(f) ŗti(g) dh. At. O(h) {a c} 6. 1. 87 VA supy. Api. Sale(i) {f g h a c} 6. 1. 88 Ota. H am. Saso. H(j) 6. 1. 89 e”ni(k) parar. Upa. M(l) { f h a} 6. 1. 90 a{b + c[d(1+e) + fh(g(1 + i)] + j + kl)} 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Anuvŗtti … contd Maximum advantage of features of Natural Language: How are the complete phrases reconstructed? Ak. Anksha (Expectancy): Major role in deciding the anuvŗtti 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Anuvŗtti … contd 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) 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Anuvŗtti … Contd 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 4 th APCAP Dec 5 th 2008, NIAS Bangalore 1/3.
Information Theory Normal Arrangement of Alphabet a. Ai. Iu. Uŗļe. Eo. OMH k c ţ t p kh ch ţh th ph y r S ş g j. d d b gh “n jh ~n. dh. n dh n bh m l v s h 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Shivas. Utra Panini required several(42) subsets of this alphabet to describe various operations. 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Shivas. Utra Some of these subsets: All vowels All consonants All vowels + semivowels h y v r l + consonants 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Shivas. Utra 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 Shivas. Utras. 4 th APCAP Dec 5 th 2008, NIAS Bangalore
S H I V A S U T R A S aiu. N ŗļK eoc E O “N hyvr. 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 kp. Y SŞ s R h. L 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Shivas. Utras. . contd Optimality of these s. Utras is proved independently by Kiparsky (linguistically) and Petersen (mathematically) 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Shivas. Utras. . . contd Given a set of Partially Ordered sets, Now it is possible to tell Whether the elements are Shivasutra encodable or not. Ref: Petersen(2008) 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Dynamics Information Theory: Deals with Measure of information, data compression, etc. Information Dynamics: Focuses on flow of information in a language 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Dynamics 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. 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Dynamics … contd Where a language codes information: Useful to decide the parsing Strategy 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Dynamics … contd How a language codes information: Useful to decide whether the information can be passed on to other language without any efforts or not 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Dynamics … contd 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. 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Information Dynamics … Contd Where: anabhihite 3. 1. 1 How much: svatantra. H kart. A 1. 4. 54 How (the manner): sam. Ana kartŗkayo. H p. Urvak. Ale 3. 4. 21 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages Data + Algorithm = Program Algorithm: Around 4000 s. Utras Data: Shivasutra ga. Nap. Atha Dh. Atup. Atha u. NAdi s. Utra li”ng. Anu. SAsana 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Data + Algorithm = Program Object Oriented Programming: Encapsulation of data with the (markers to the) functions Bhaj + (gh)a(~n) : Presence of gh => j->g 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Ordering of rules: Two meta rules a) viprati. sedhe param k. Aryam 1. 4. 2 (In case of conflict apply the later rule) b) p. Urvatra asiddham 8. 2. 1 (Apply the rules in last 3 sections at the end and in linear order) 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Typical Vaiy. Akara. na's view: Event driven Programming Changes in the Data spaces: Event ==> Triggers the rules 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Typical vaiakara. nas view: 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Control: Certain rules block certain other rules. Blocking is of 3 different types a) Partial blocking (asiddhavat) b) certain rules are not applicable (asiddha. H) c) only certain rules are applicable (asiddham) (direct implication on : passing of parameters) 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Partial Blocking: Asiddhavat atra Abh. At 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Ordering of the s. Utras 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Control: a) If X then Y (m. A. thara kau. ndi. nya ny. Aya) b) If X then Y else Z (takra kau. ndi. nya ny. Aya) c) If (not X) then Y (ni. sedha) d) if X then (Y and Z) (vibh. A. s. A) 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Conflict Resolution: Utsarga / apav. Ada General / special rule 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Use of Special Features of Sanskrit Use of Vibhaktis (case markers) Order of parameters in a function Ika. H ya. n aci Ik ac → ya. n ac 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Use of Special Features of Sanskrit Use of Pronouns as variables Tasmin iti nirdis. te p. Urvasya Tasm. At iti uttarasya 4 th APCAP Dec 5 th 2008, NIAS Bangalore
Programming Languages … contd Inheritance Multiple inheritance → arranged as a linear inheritance Taddhita pratyaya Ashwini Deo 2007 4 th APCAP Dec 5 th 2008, NIAS Bangalore
- Slides: 40