Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
50 views95 pages

Sentence Formation

Sanskrit

Uploaded by

noresh2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views95 pages

Sentence Formation

Sanskrit

Uploaded by

noresh2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 95

Parser for Simple Sanskrit

Sentences
based on Pān.inian Grammar Formalism

Master of Philosophy
in
Shabdabodha Systems and Language Technologies

By
N. Shailaja

Department of Sanskrit Studies


School of Humanities
University of Hyderabad
Hyderabad 500046
June 2009
2
Declaration

I hereby declare that the work embodied in this dissertation entitled Parser
for Simple Sanskrit Sentences based on Pān.inian Grammar formal-
ism is carried out by me under the supervision of Amba Kulkarni, Depart-
ment of Sanskrit Studies, University of Hyderabad, Hyderabad and has not
been submitted for any degree in part or in full to this university or any other
university.

N Shailaja

08HSLS03

Date:

Place: Hyderabad
2
Department of Sanskrit Studies
University of Hyderabad

CERTIFICATE

This is to certify that N Shailaja has carried out the research-work em-
bodied in the present dissertation entittled “ Parser for Simple Sanskrit
Sentences based on Pān.inian Grammar Formalism ” at the Univer-
sity of Hyderabad. The dissertation represents her independent work and has
not been submitted for any research degree of this university or any other
university.

Amba Kulkarni
Supervisor

Amba Kulkarni
Head
Department of Sanskrit Studies

Mohan G Ramanan
Dean
School of Humanities
University of Hyderabad
2

ACKNOWLEDGMENTS

At the outset, I would like to thank to God who gave me lot of energy to
complete this work and then I would like to thank to Acharya Anand
Prakash and Mrs B. Neeraja for their precious and valuable guidance
and they enlightened me from the darkness.

The single most important person that must be acknowledged here, without
whom this dissertation would not have been there, is Mrs. Amba Kulka-
rni who not only suggested this topic but also came through in the process
of the research.

I am grateful indebted to my supervisor Mrs. Amba Kulkarni for her


valuable guidance. She have been extremely cordial and co-operative during
the research and I am thankful to her support and encouragement.

I am sincerely thankful to Prof. K. V. Ramakrishnamacharya &


Prof. Malhar kulkarni who has been cleared my doubts.

I am heartly thankful to Prof. Vineet Chaitanya (IIIT), Dr. Dipti


Mishra (IIIT) and Dr. Laxmi Bai (IIIT) for their support and en-
couragement.

I am thankful to my seniors Mr. Anil Kumar Gupta & Ms. Shivaja


S.Nair for helping me a lot.

I am very much thankful to my classmates Mr. Abart, Mr. Shiva &


Ms. Ramya sai for their helping in many ways.
3

I express my gratitude towards my parents for their love and affection and
for their continuous encouragement and moral support. I express my special
thanks to my husband Mr. Lakshman who gave me encouragement and
moral support to finish this work.

I wish to thank them too whom I could not list out but directly or indirectly
they helped me a lot.

N.Shailaja
Contents

Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . i

1 Introduction 1

2 kAraka and vibhakti 5

2.1 kArk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1.1 kA . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.2 km . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.3 krZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1.4 sMþdAn . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1.5 apAdAn . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.1.6 aEDkrZ . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2 uppd EvBEÄ . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

i
ii Contents

3 fANdboD 15

4 Earlier efforts 21

5 About CLIPS 25

5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.1.1 Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.1.2 Deftemplate . . . . . . . . . . . . . . . . . . . . . . . . 29

5.2 Basics of CLIPS operations . . . . . . . . . . . . . . . . . . . 30

5.3 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.4 Sample input . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.5 Sample output . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6 Facts and Rules 35

6.1 Fact Templates . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6.2 Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6.3 Rule Description . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.3.1 Rule for retracting an analysis . . . . . . . . . . . . . . 40

6.3.2 Rule for marking upapada vibhakti . . . . . . . . . . . 46


Contents iii

6.3.3 Rule for marking kArk roles . . . . . . . . . . . . . . . 48

7 Conclusion 51
Chapter 1

Introduction

&yAHyAkAr\ vrzE \ BA ykAr\ ptÒElm^.

pAEZEn\ s/kAr\ þZto_E-m mEn/ym^;

India has rich heritage in linguistic studies. Out of the six v


dA½s (fields
of studies necessary to study the vedas) viz. Ef"A , &yAkrZ , Cds^ ,
EnzÄ , >yoEtq and kSp, the first four are concerned with language stud-
ies. Ef"A deals with pronnciation, &yAkrZ with grammatical aspects, Cds^
with prosody and EnzÄ with etymology. Among all these the importance
of &yAkrZ is long recognised and is evident from the enormous literature
on &yAkrZ. It has a major role to play in understanding how a language
communicates thoughts from one human being to the other.

1
2 Chapter 1. Introduction

pAEZEn in around 500 BC presented a concise and almost exhaustive descrip-


tive coverage of the then prevalent Sanskrit language. This grammar is in

the form of s/s – around 4000 divided into 8 chapters of 4 sections each.
“pAEZEn’s grammar is universally admired for its insightful analysis of San-

skrit”(Kiparsky, 2002).

kA(yAyn supplemented the work of pAEZEn with vAEtks. Later on ptÒEl


wrote a detailed commentary on these two works ruling out the necessity of

some of the vAEtks. This rich tradition continued further with major contri-

butions from BthEr in the field of Language philosophy, and later by nAg
f
BÓ , kOX BÓ, etc.

The studies in grammar further led to three important schools – &yAkrZ ,


mFmA\sA and yAy. These are popularly known as pd , vAÈ and þmAZ fA-/
respectively, indicating the nature of the topics they deal with.

It is evident from the scientific literature that Sanskrit was “Lingua franca”

of scientific discussions in India. But that material is today not accessible to

the scientists who do not have enough exposure to Sanskrit. With the help

of language technology, today it is possible to develop language processing


3

tools to provide access to these Sanskrit texts.

With the advent of computers, and availability of extensive Sanskrit text in

electronic form, the vast Sanskrit literature is now available to the scholars

easily. But still, those who do not know Sanskrit well, can not understand

it. The advantages in the field of Machine Translation, and the availability

of pAEZEn’s a£AyAyF can lead to the development of appropriate tools for


accessing Sanskrit texts.

The aim of this thesis is to build a parser for simple Sanskrit sentences. This

parser will analyse simple Sanskrit sentences and assign kArk roles to vari-
ous nouns in a sentence. The parser will be based on pAEZEn’s grammar.

This being an interdisciplinary work, in the next chapter, we give a brief

background of the Panini’s sutra related to EvBEÄ and krk. The third
chapter illustrate the process of fANdboD theories the avy of given words.
The fourth chapter gives a breif summary of earlier efforts in this area. The

fifth chapter introduces a computational environment - an expert system for

programming viz CLIPS(C Language Integrated Production System), which

is being used for developing the parser. Sixth chapter discusses the actual
4 Chapter 1. Introduction

implementation explaning sample rules. We cunclude with the directions

for future work. In the seventh chapter we discuss the problem cases, and

discuss the possible ways of solving them. The simple parser has been tested

on a set of around1 130 sentences from introductory grammer books. The

evaluation report is in the eighth chapter. The final chapter lists the future

tasks and resources that are needed to build a realistic parser for Sanskrit.
Chapter 2

kAraka and vibhakti

Sanskrit is a highly inflectional language. Every word, be it a noun or a verb

has to be inflected before it is used in a sentence. An inflected word is termed

pd 1 and apdm^ n þyÒFt is the verdict of a grammarian (one must not use
a word, unless it is inflected). There are seven EvBEÄs (case-affixes) which
make a crude form viz. þAEtpEdk usable. These are called kArk EvBEÄs if
they denote a relation between a noun and a verb. When these EvBEÄs are
governed by on uppd, they are known as upapada EvBEÄs. In the following
sections, we give a brief note on both of these. But before that, let us first

understand what a kArk is.

1
sEØRtm^ pdm^ (1.4.14)

5
6 Chapter 2. kAraka and vibhakti

2.1 kArk

kArk is the name given to the relation between a noun and a verb in a sen-
tence. The literal meaning of the word is: any factor which contributes to

the accomplishment of an action2 .

kroEt = E‡yA\ EnvtyEt iEt kArkm^.3


yt^ E‡yo(pO kArZ\ td
v kArkm^.
mhABA y
 uÄm^- “kArkEmEt mhtF s\âA E‡yt
 ... t/ mh(yA, s\âAyA, krZ

t^ , krotFEt kArkm^”. In vAÈpdFy
ett^ þyojn\ yTA avTs\âA EvâAy
also BthEr states
-vA™y
 smv
tAnAm^ t’d
vA™yAtr
.
E‡yAyA aEBEn pO sAmLy sADnm^ Evd,;

Here sADn is a synonym of kArk.

The relation of a noun to another noun in a sentence is not a kArk. A kArk

must be related with a verb: E‡yAvEy(vm^ kArk(vm^. There are six kArks:
kA, km, krZ, sMþdAn,apAdAn and aEDkrZ. Appendix I lists all the s/s
that discribe these kArks . All these s/s come under the kArk
. These
2
kArkAEZ Eh -v-v&yApAr
Z avAtr E‡yA’Ar
Z vA k
nAEp!p
Z þDAn E‡yo(ptO
shAykAEn BvEt.
3
E‡yAEn pAdk(v\ kArk(vm^ aTAt^ E‡yo(pAdk!pATyÄ(v\ kArk(vEmEt
2.1. kArk 7

s/s describe the semantic meaning of the kArks. pAEZEn further in the first
chapter fourth pAd gives s/s which describe the EvBEÄs used for realisation
of various kArk relations.
pAEZEn starts his kArk section with the aEDkAr s/ ”kArk
” (1.4.23). We
describe in brief, each of the kArks, as described by the pAEZEn’s rule, fol-
lowed by the rule governing the vibhakti of that kArk, followed by an exam-

ple. We do not discuss the exceptional cases.

Sanskrit has three voices – kt , km and BAv. In case of ktvAQy (roughly
active voice), the kA is said to be expressed through the verbal suffix. If a
verb is skmk (roughly transitive), it is the km which is expressed through
the verbal suffix, and finally in case of akmk (roughly intransitive) verbs,
what is expressed through the verbal suffix is the action. Now let us see more

about these 6 kArks.

2.1.1 kA

kA is defined as -vt/, kA (1.4.54). The most independent participant


in the action is termed as karttA. It is the speaker’s intention (Evv"A) which

assigns different roles to the participants of an action. Speaker ‘expresses’ the

situation/event through the words. While wording his thoughts/expressions,

he is free to assign the roles to various participants according to his intention.

So for example, consider the situation: There are 4 participants: Devadatta,


8 Chapter 2. kAraka and vibhakti

-TAlF(vessel), odana(rice), kA¤(wood pieces) and finally the action of cook-


ing(pA n E‡yA). If the speaker is simply narrating an incidence that a cook
by name Devadadda is cooking the rice in a vessel, he would say

dvd, -TASyAm^ aodnm^ p Et.

But if his intention is to express the fact that the vessel is big enough to cook

the rice, or the vessel has a particular capacity to hold the cooked rice, he

will say

-TAlF p Et.

ptÒEl in mahAbhA.syam says ‘in the absence of a king the senior most
minister will enjoy the powers of king.’4 tTA amA(yAdFnAm^ rAâA sh
smvAy  -vAtìym^. Now, pada is defined as sEØRtm^, so a
 pArtìy\ &yvAy
þAEtpEdk expressing a kA relation in ktvAQy should have some nominal
suffixes else it can not be pd. Therefore, to make such a þAEtpEdk a pd,
þTmA EvBEÄ is added. pAEZEn has a s/
þAEtpEdkATEl½pErmAZv nmA/
 þTmA. (2.3.46)
4
ev\ tEh þDAn
n smvAy
 -TAlF prt/A , &yvAy
 -vt/A
2.1. kArk 9

Thus in case of ktvAQy kA will have þTmA EvBEÄ, and in case of kmvAQy,
km will have a þTmA EvBEÄ. Such a kArk which is expressed by the verbal
suffix is called aEBEht. In case a kA is not expressed or anEBEht, as in the

case of kmvAQy, then it gets third case suffix by the s/ ”ktkrZyo-ttFyA”.

San: dvd, p Et.


gloss: Devadatta cooks.

San: dvd
n pQyt
.
gloss: dvd{3} cooks. (being cooked by Devadatta).

2.1.2 km

ktrFE=sttm\ km (1.4.49).
What the kA seeks the most to attain by its action is the karma.
The vibhakti assignment rules are two:

In case the karma is not expressed (anabhihite 2.3.1), kmEZ E’tFyA (2.3.2)
assigns second case suffix to the karma.

If the karma is expressed, then karma being abhihita, will get prathamA

vibhakti.

San: dvd, aodnm^ B­


.
gloss: Devadatta rice{2} eats.

San: dvd
n pQyt
.
10 Chapter 2. kAraka and vibhakti

gloss: devadatta{3} cooks. (being cooked by Devadatta).

2.1.3 krZ

sADktm\ krZm^ (1.4.42). The factor most effective in the accomplishment


of the action is termed as krZ or instrument.
ktkrZyo-ttFyA (2.3.18) assigns third case suffix to the krZ.

San: l
KyA ElKEt
gloss: lekhani{3} writes. (writes with pen)

2.1.4 sMþdAn

kmZA ymEBþ
{Et s sMþdAnm^. (1.4.32)
That which the agent wants to connect with the object of the action of giv-

ing is called recipient. aEBþ


{Et means sMbˆEmQCEt – wants to connect. By
giving is meant passing of one’s ownership of the thing to the recipient. The

term sMþdAn is meaningful. The two upasargas sm^ and þ give the qualified
sense viz. complete transfer.

sampradAna is expressed by the fourth case by the s/ ” tTF sMþdAn”


(2.3.13)
2.1. kArk 11

San: EvþAy gA\ ddAEt.


gloss: brahmin{4} cow gives. (gives cow to a brahmin)

2.1.5 apAdAn

The s/ ”D
}vm^ apAy
 apAdAnm^” (1.4.24) states that “when ablation or sepa-
ration is to be effected by a verbal action, the point of separation is called the

ablative”. Further the s/ ”apAdAn


 pÑmF” (2.3.28) states that the ablative
case is denoted by the fifth case affix. Thus in the example

San: go£Ad^ gov(so EngQCEt.


gloss: cow-shade{5} calf go away.

The separation or departure of calf from the cow-shade is marked by the fifth

case suffix.

2.1.6 aEDkrZ

”aADAr, aEDkrZm^ (1.4.45)”, is the s/ describing the locus or aEDkrZṪhe


place or thing which is the site or substratum of the action subsisting in the

agent or the object and is thereby the immediate site of action is aEDÿ
krZȦccording to BthEr
kt - km&yvEhtAmsA"AˆAryE(‡yAm^.
12 Chapter 2. kAraka and vibhakti

upkvt^ E‡yAEsˆO fA-/


 aEDkrZm^ -mtm^;

The s/ ”sØMyEDkrZ


 ” (2.3.36) assigns seventh case to express the aEDÿ

krZ.

San: kV
 bAElkA aE-t.
gloss: The girl is on the mat.

Thus in a nutshell, kArk is a semantic relation expressed through the EvBEÄs,

and there are 6 such kArk relations.

2.2 uppd EvBEÄ

There are also certain indeclinable words which demand certain case suffixes.

Such words are called uppds – upoÎAErt\ pdm^ – a word pronunced in close
proximity. In other words, when a noun takes certain case-affixes by virtue

of its being in composition with some other word in the proximity with it, it

is called an uppd EvBEÄ.


For example, look at the sentence:

San: rAm
Z sh sFtA vn\ gQCEt.
gloss: Rama with Sita forest goes. (Sita goes to forest with Rama).
2.2. uppd EvBEÄ 13

In this example, rAm has third case suffix. This is because of the presence of
the word sh. This sh is the word in close proximity (uppd). This upapada
demands that rAma should have third case suffix. Thus this third case suffix

does not denote any relation between a noun and a verb.

There are 6 types of uppd EvBEÄs corresponding to the 6 case suffixes viz.
2, 3, 4, 5, 6 and 7.

The s/s indicating the words demanding these EvBEÄs is given in Appendix

II.
14 Chapter 2. kAraka and vibhakti
Chapter 3

fANdboD

What we have seen so far is how the kArks are realised in a sentence through

the EvBEÄs. The process of understanding the meaning of a sentence, is a re-

verse process. This process is termed as the process of fANdboDİn India, the
three schools viz. &yAkrZ , yAy and mFmA\sA differ in the process of fANdÿ
boD slightly. The process of fANdboD involves basically the identification of
modifier and modified (Evf
 y and Evf
qZ). According to v
{yAkrZs DA(vAT
(meaning of a verb) is the mHy Evf
 y. The n
{yAEyks take the þTmAt (the
one in first case suffix) as the mHy Evf
 y. There is very subtle difference
between the mFmA\sks and v
{yAkrZs approach. mFmA\sks take BAvnA as the
mHy Evf
 y.

15
16 Chapter 3. fANdboD

We will not go in the theoretical discussions on the differences between these

three schools and their consequences, etc. Our main aim is to develop in-

telligence in the system so that computer can assist human beings in under-

standing the Sanskrit texts.

If we look at Sanskrit books on various topics, we see that the original s\EhtA

text is followed by simple pdpAW, followed by the information on various


compounds in the text, and finally the anvaya. This avy is done taking
into account the s/s which assign different EvBEÄs to kArks. Look at the
example from the ‘s\"
p rAmAyZm^’(see figure 3.1). Here we see all the steps
mentioned above.
17

Figure 3.1: Sanksheparamayana


18 Chapter 3. fANdboD

The s/s stated in the chapter 2 above are directly relevant and useful for the

generation of Sanskrit texts. When a listener listens to a sentence, now what

s/he gets is the EvBEÄs. From these EvBEÄs, the listener should analyse and

get the kArks. This task is not an easy task. We give here some examples
to illustrate the complexity.

Look at the sentence:

San: rAm, vnm^ gQCEt.


gloss: Rama forest goes.

The morphological analyser does the analysis of each of these words, and

produces the following answers for each of the words.

rAm, : rAm {1,p\El½, ekv nm^}


: rA {ktEr , lV^ , um p.,bhv nm^ , pr-m
{pdF}

vnm^ : vn {1, np\, ekv nm^}


: vn {2, np\, ekv nm^}

gQCEt : gm^ {þ0. p0., ek v0,̇ lV^, pr-m


{0,}
gQCEt : gm^ + ft0 + {7, np\0, ekv nm^}
19

gQCEt : gm^ + ft0 + {7, p\0, ekv nm^}

A human being while reading does not even ‘see’ these ambiguities. But

when we analyse using machine, since machine does not use common sense,

world knowledge, etc. shows all possible analysis. So machine has two tasks:

• Deciding the main verb (whether rA or gm^), and

• Assigning the kArk roles.

The question is, whether there is any way to rule out the possibility of rA
being a DAt. Following s/ by pAEZEn comes to our rescue:
”y-y BAv
n BAvl"Zm^.”. (2.3.37)
This s/ rules out the possibility of the following two analysis of gQCEt.
gQCEt : gm^ + ft + {7, np\0 , ekv nm^}
gQCEt : gm^ + ft + {7, p\0 , ekv nm^}
This now leaves only one analysis of gQCEt as a verb. Further the verb gam

has an expectancy of two kArks viz. kA and karma. Further the word
gQCEt is ktvAQy. Hence kA being aEBEht should be in þTmA EvBEÄ.
But there are two pds viz. both rAm and vn in þTmA EvBEÄ. Hence the
question is which one should be taken as kA. We postpone this decision,
and look at the word with second case suffix to decide the km. We get only
one word viz. vnm^. Hence it is assigned a km role. Since any noun can not
20 Chapter 3. fANdboD

have more than one roles. Because, all the s/s describing kArk sâAs are
governed by the s/ ”aAkAXArAt^ ekA sâA”(1.4.1). Hence vanam can get
only one sâA viz. km. This leaves rAm with the kA kArk role. Thus we
see that various s/s of pAEZEn come into play in assigning the kArk roles
to the nouns.

Let us consider the possibility of rA as a verb. The verb rA is in umpzq,


and is in ktEr þyog. Hence, one may assume the kA to be vym^, and need
not be specified. vnm^ being in E’tFyA EvBEÄ can be km for rA. But then
gQCEt will remain without any kArks. Hence this avy will be ruled out
leaving only one avy as follows:
rAm, = kA of gQCEt.
vnm^ = km of gQCEt.

We try to follow this process mechanically, taking the help of pAEZEn’s s/s.
To implement this mechanically, what is needed is a mechanism to solve the

constraints simultaneously. We have used the CLIPS for implementing the

system. In the fifth chapter we discuss the CLIPS environment followed by

the overall architecture.


Chapter 4

Earlier efforts

There have been much enthusiasm in the field of Sanskrit computations since

the advent of computers. There have been efforts to demonstrate suitability

of Sanskrit shastra for automatic language processing as well as to develop

computational tools for processing Sanskrit texts. The few notable efforts

of the first type are by the Akshar Bharati group(Bharati,1994). The latter

have been tried by various individuals and groups – Huet(2008), Scharf(2008),

Jha(2008), and Goel(2007), apart from the department of Sanskrit Studies

in collaboration with Rashtriya Sanskrit Vidyapeetha, Tirupati, to name a

few. There are also ongoing efforts to model the paninian process of anal-

ysis through computers by Sharf(2008), Mishra(2009), Goel(2008), and the

package gZk - a£AyAyF (-vAEm trSbAl,2009). The majority of these han-

21
22 Chapter 4. Earlier efforts

dle morphology reasonably well. Only few of them have been handling the

parsing at sentence level.

Parsers based on Paninian Grammar was developed by Bharati (1995). This

parser was developed following the Integer programming approach, and later

on improved by adapting the bipartite graph model. This Parser was devel-

oped for Hindi and not for Sanskrit. The parser required kAraka charts for

each verb describing the various kArk roles that are mandatory for the verb

(i.e. the expectancy), and the corresponding EvBEÄs the corresponding noun

takes.

A kArk chart essentially marks the necessity of a kArk (whether it is manda-

tory, desirable or optional), and shows the corresponding vibhakti. The

mandatory kArks are kA and karma in case of transitive verbs, and kA
in case of intransitive verbs. sMþdAn is also mandatory in case of certain
verbs, whose list is available through the pAEZEn’s s/s. Further the desir-
able kArks are the krZ andapAdAn. Most of the verbs have an expectancy
for these kArks. aEDkrZ being the location or aADAr for either kA or
km, is a kArk which any verb can have. At the same time, unless necessary,
one does not mention it. Hence it is optional.

Now, if we look at the pAEZEn’s way of organisation, we see that, Panini


assumes the knowledge of sakarmana/akarmaka while framing his rules. We
23

refer to XawuprakASaH (in press) for the kmAkA"A information. Next, the
list of verbs desiring some kArks such as sMþdAn, apAdAn etc. is also listed
separately. So with this information, we decided to use the pAEZEn’s s/s
only and develop a rule based parser, instead of using the kArk charts.
24 Chapter 4. Earlier efforts
Chapter 5

About CLIPS

5.1 Introduction

Making computer think like people is Artificial Intelligence. In our effort to

develop a parser, we will be training a computer to ‘think’ like a human being

and decide the kArk relations. An expert system or an intelligent system is


a special system that uses Artificial intelligence techniques. A typical expert

system consists of

• Knowledge Base (Rules)

The knowledge base is in the form of IF THEN rules. For example,

25
26 Chapter 5. About CLIPS

IF

the noun has sMþdAn role


THEN

it will take tTF EvBEÄ.

Here the section of the rule between IF and THEN viz. ‘the noun

has sMþdAn role’ is called an antecedent or conditional part or pattern

part or Left Hand Side (LHS). The part after THEN is called the

consequence, or the Right Hand Side (RHS). When this condition is

satisfied, or the pattern is matched with any of the existing facts from

the memory, then rule is said to be fired.

• Facts

The facts is the actual working memory. It varies with the inputs, and

the state of the system.

• Inference Engine

The inference engine makes inferences by deciding which rules are sat-

isfied by the facts. All the rules for which the facts match the LHS, are

said to be activated or satisfied. All these rules will be on the agenda.

In such cases, the inference engine should choose one of the rules. This

selected rule then is fired. The selection of the rules is called conflict
5.1. Introduction 27

resolution. The conflict resolution may be either explicit by prioritizing

the rules, say by assigning the saliency, or implicit based on the speci-

ficity of conditions etc. In case the rules are provided with a saliency,

a rule with highest priority is selected by the inference engine.

The expert system language that I have used in my thesis is called CLIPS

which is an acronym for C Language Integrated Production System. CLIPS

was designed at NASA/Johnson Space Center with the specific purposes

of providing high portability, low cost, and easy integration with external

system. CLIPS was written using the C programming language to facilitate

these objectives.

The basic elements of CLIPS, as of any expert system, are

• Fact-list: global memory for data.

• knowledge-base:contains all the rules.

• Inference engine:controls overall execution.

5.1.1 Facts

Each chunk of information is called a Fact. Facts consist of:

a name with zero or more fields for associated values. For example, the fol-

lowing fact defines a name or a field called ‘sentence’, whose value is ‘rAm,
28 Chapter 5. About CLIPS

g}Amm^ gQCEt.’
(sentence (rAmaH grAmam gacCati))

This is a simple fact. Consider another example: The morphological analysis

of the word rAme.na consists of several facts viz. rAma is the prAtipadika,

its gender is masculine, the word is in the singular number, and it is in third

case ending. This is represented in CLIPS as follows

(word rAmeNa)

(number singular)

(vibhakti third)

(gender masculine)

The problem with such kind of representation is, if we have several words,

then whose number is what, which one is singular, which one is masculine

is not recorded. The association of the word with its features is gone. To

avoid it, we make use of structured facts. To use the structured facts, first

CLIPS should be informed about the new structure. This is done through

the DEFTEMPLATE.
5.1. Introduction 29

5.1.2 Deftemplate

Before facts can be constructed, CLIPS must be informed of the list of valid

slots for a given relation name. A deftemplate is used to describe groups of

facts sharing the same relation name and contain common information. The

deftemplate for subanta is given below.

(deftemplate sup

(slot id)

(slot word)

(slot rt)

(slot lingam)

(slot viBaktiH)

(slot vacanam)

(slot kAraka))

The morpological analysis for the word, say rAmebhyah., now will be a fact.

This analysis will have the template structure of sup. The fact is then de-

clared or stored in the working memory as

(deffacts (sup

(id 1) (word rAmeByaH) (rt rAma) (lingam puM) (viBakwiH 4) (vacanam

bahu)) )
30 Chapter 5. About CLIPS

Facts with a relation name defined using deftemplate are called deftemplate

facts.

5.2 Basics of CLIPS operations

In this section we give the basic commands to handle CLIPS.

• Entering and Exiting CLIPS

1. Once the CLIPS has been installed, the command ‘clips’, should

activate the the CLIPS shell.

2. The CLIPS prompt is: ‘CLIPS>’ where command can be entered

directly to CLIPS is called the top level mode.

3. To exit CLIPS ’or’ The normal mode of leaving CLIPS is with the

exit command. The syntax of this command is (exit)

• Displaying Facts:

The facts command can be used to display the facts in the fact-list.

The syntax of the fact command is ‘CLIPS> (facts)’.

• Adding and Removing Commands: All facts known to CLIPS are

stored in the fact-list. To add a new fact to the fact-list, we can use
5.2. Basics of CLIPS operations 31

the assert command. The syntax is assert command: ‘CLIPS> (assert)’

Example: (assert (viBakwiH 1) (vacanam eka))

Just as facts can be added to the fact-list, they can also be removed.

Removing facts from the fact-list is called retraction and is done with

the retract command. The syntax for retract is:

‘CLIPS> (retract <integer>)’

‘(clear)’ or ‘(retract *)’ will remove all the facts.

• Modifying Facts:

Slot values of deftemplate facts can be modified using the modify com-

mand.

Example: (modify ?s1 (kAraka karwA))

• Rules: Rules can be typed directly into CLIPS or they can be loaded

in from a file of rules created by an editor. In CLIPS, the ‘IF cond

THEN action’ is written as

cond
32 Chapter 5. About CLIPS

=>

action

Thus, explicitly the words IF and THEN are not written. The part

before the => is the condition and the part after it is the action.

• Execution and Agenda:

After specifying the rules and providing the action, to execute the rules

i.e. to run the CLIPS program, use the run command.

The syntax of the run command is: CLIPS¿ (run)

When the program runs, and there is a conflict, then the rule with the

highest salience on the agenda is fired.

All the rules that satisfy the conditions, are on agenda. To display the

rules on the agenda, use agenda command: ‘CLIPS¿ (agenda)’

An agenda command would produce the following output.

• Reset:

The reset command is the key method for starting or restarting. Facts

asserted by a reset satisfy the patterns of one or more rules and place

activation of these rules on the agenda.

• The printout command is used to print information.


5.3. Architecture 33

Example: CLIPS¿ (printout t ‘stop’ crlf)

‘t’ stands for the standard output device.

• ‘load’ command is used for loading of rules from an external file.

• ‘save’ command is opposite of load, and allows saving of constructs to

disk.

• save-fact will save all facts in the fact-list in file and load-fact will load

it.

5.3 Architecture

The flow diagram of the system is given in figure 5.5. The input for our

parser is a Sanskrit text with single finite verb (ti”n), and the output is its

kArk analysis. The main purpose of this exercise is to do only kArk and
uppdEvBEÄ analysis. The input sentence is passed through the morpholog-
ical analyser to get the word level analysis. This analysis is then converted

into CLIPS facts. The facts, which vary with a sentence, along with the rules

are then passed to the CLIPS interpreter for the kArk analysis.
34 Chapter 5. About CLIPS

5.4 Sample input

rAm, vnm^ gQCEt.

5.5 Sample output

rAm, = kA of gQCEt


vnm^ = km of gQCEt
Chapter 6

Facts and Rules

In this chapter we describe the templates used for declaring the facts, fol-

lowed by the rules. The structure of templates is largely influenced by the

morphological analyser output. pAEZEn classifies the words into two types:
sbt and EtRt. But this classification is not sufficient for our purpose.
Consider the ÆAt word say ‘g(vA’. If we just mark it as a sbt, or to
be more specific, say an a&yy, it is not sufficient. The reason being, the
underlying verb ‘gm^’, has its own expectancies. And to know that it has

expectancies, the machine should know that the there is an underlying verb,

and it has certain expectancies. Hence we define the templates for sbt ,
Et½t , a&yy , tEˆt and kdts. We give below the slots available in each
of them. These slots correspond to the features associated with that form.

35
36 Chapter 6. Facts and Rules

We also make a provision for the slot corresponding to the kArk analysis,
which will be filled in by the CLIPS inference engine. In case of verbs, slotes

for the corresponding kArk positions are provided.

6.1 Fact Templates

(deftemplate sup

(slot id) ; To store the word number

(slot mid); To store the analysis id

(since in principle, there can be more than one ids)

(slot word); To store the given word

(slot rt) ; to store its pratipadika

(slot lingam) ; to store the linga

(slot vibhaktiH) ; to store the vibhakti

(slot vacanam) ; to store the vacana

(slot kAraka)) ; to store the kAraka role

(deftemplate tin

(slot id)

(slot mid)

(slot word)
6.1. Fact Templates 37

(slot rt)

(slot dhatuH)

(slot lakAraH)

(slot prayogaH)

(slot purushaH)

(slot vacanam)

(slot padI)

(slot gaNaH)

(slot karttA_pos)

(multislot karma_pos)

(slot karaNa_pos)

(slot sampradAna_pos)

(slot apAdAna_pos)

(slot adhikaraNa_pos))

(deftemplate krt ; For kridantas

(slot id)

(slot mid)

(slot word)

(slot krt_pratyayaH)

(slot lingam)
38 Chapter 6. Facts and Rules

(slot vibhaktiH)

(slot vacanam)

(slot rt)

(slot dhatuH)

(slot gaNaH)

(slot karttA_pos)

(slot karma_pos))

(deftemplate avy

(slot id)

(slot mid)

(slot word))

(deftemplate taddhita

(slot id)

(slot mid)

(slot word)

(slot rt)

(slot lingam)

(slot vibhaktiH)

(slot vacanam))
6.2. Rules 39

6.2 Rules

We process the input in two steps. In the first step, wherever possible, we try

to remove irrelevant morphological analysis. This then helps us in reducing

the search space, and also if machine fails, then it helps the human being to

rule out some of the possibilities. For example, as explained earlier, in the

sentence ‘rAm, vanam gQCEt’, the analysis of the word gQCEt as a subanta

is irrelevant. Hence we remove or retract it. Similarly, there are many cases,

where a word is ambiguous between the second case or first case and also the

sMboDn. The sMboDn will be irrelevant only if certain special conditions are
met. For example, consider the sentence

bAl, KAdEt.

In the sentence bAl, KAdEt. the word KAdEt can have the following analysis
KAdEt -/F 8 ek0 where KAdEt is the feminine ft form. But in this context,
since their is no verb with loV^ lkAr or EvEDElR^ lkAr (see appendix
Assign Karaka Rules for more details), this analysis is ruled out.

We illustrate below one rule corresponding to the s/


”y-y BAv
n BAvl"Zm^” (2.3.37).

Second step is to actually assign kArk roles. Now the EvBEÄs may be either
40 Chapter 6. Facts and Rules

upapada or kArk. We first mark the words with uppd EvBEÄs, since these
are just next to the given words. After this, then we assign the kArk EvBEÄs.

Assigning kArk EvBEÄs is not an easy task. Because several times a word
has more than one morphological analysis possible. In such cases, we have to

look at the assignments simultaneously, and not sequentially. as explained

earlier.

We describe below three rules, one for removing the irrelevant morphological

analysis, the second one for marking the upapada EvBEÄs and the third one
for marking the kArk EvBEÄs.

6.3 Rule Description

6.3.1 Rule for retracting an analysis

In this section we describe a rule that retracts the seventh case analysis when

it is irrelevant.

• Motivation for the necessity of a rule

Look at the sentence:

rAmah. vanam gQCEt.

Here in this sentence gQCEt has three possible analysis, viz -


6.3. Rule Description 41

gQCEt : gm^ {þ0. p0., ek v., lV^, pr-m


{0,}
gQCEt : gm^ + ft + {7, np\0, ekv nm^}
gQCEt : gm^ + ft + {7, p\0, ekv nm^}
The second and the third analysis are not relevant in this context.

Hence these analysis may be ruled out on the basis of pAEZEn’s s/
”y-y BAv
n BAvl"Zm^” (2.2.37). The meaning of this s/ is:
If an activity aims at another activity then the verb denoting the first

activity will have seventh case (naturally after a kdt). In such cases
either the kA or the km or both of this first activity will also be then

in seventh case.

• Rule in CLIPS

(defrule sati-saptami

(test (>= (count-sati-saptami krt) 1))

;if there is at least one {\dn E\387wd\306wt} with 7 {\dn EvBE\3C4w}

=>

(do-for-all-facts

((?w kqw))

;for all k.rdantas

(eq ?w:krt_pratyayaH satri)


42 Chapter 6. Facts and Rules

;with satri pratyaya

(= ?w:vibhaktiH 7)

;and 7 vibhakti analysis

(not (any-factp ((?s sup)) (= ?s:vibhaktiH 7)))

;if there is no other subanta with 7 vibhakti

(any-factp ((?w1 sup tin)) (= ?w1:id ?w:id)))

;and the krdanta has at least one more analysis

other than satri + 7 vibhakti

(retract ?w)

;remove the satri + 7 analysis

(printout foo "(" ?w:id " " ?w:mid ")

yasya ca bhAvena bhAvalakshaNam")crlf )

• Explanation

Thus we observe that, in the sentence rAm, vn\ gQCEt’, there is a kdt
(viz.gQCEt) in seventh EvBEÄ. Therefore the condition of the rule is
fulfilled and hence the rule is fired. The action part checks every kdt
with ft+7 EvBEÄ analysis. In the given sentence there is only one
k.rdanta gQCEt satisfying this condition. Further, the next condition
that there be no other word with seventh EvBEÄ is also satisfied and
6.3. Rule Description 43

finally this word has one more analysis viz as a Et½t. Hence the
ft+7 analysis of the word gQCEt is deleted.

• Input

Only the relevant part of the input is produced here.

(deffacts morph information

(tin (id 1) (mid 1) (word rAmaH) (rt rA1)(prayogaH karwari)(lakAraH

la.t)(puruRaH u)(vacanam bahu)(paxI parasmEpaxI)(XAwuH rA)(gaNaH

axAxiH) )

(sup (id 1) (mid 2) (word rAmaH) (rt rAma)(lifgam puM)(viBakwiH

1)(vacanam eka) )

(sup (id 2) (mid 1) (word vanam) (rt vana)(lifgam napuM)(viBakwiH

1)(vacanam eka) )

(sup (id 2) (mid 2) (word vanam) (rt vana)(lifgam napuM)(viBakwiH

2)(vacanam eka) )

(krt (id 3) (mid 1) (word gacCawi) (rt gacCaw)(lifgam puM)(viBakwiH

7)(vacanam eka) (kqw prawyayaH Sawq)(XAwuH gamLz)(gaNaH BvAxiH)

(krt (id 3) (mid 2) (word gacCawi) (rt gacCaw)(lifgam napuM)(viBakwiH

7)(vacanam eka) (kqw prawyayaH Sawq)(XAwuH gamLz)(gaNaH BvAxiH)

)
44 Chapter 6. Facts and Rules

(krt (id 3) (mid 3) (word gacCawi) (rt gacCawI)(lifgam swrI)(viBakwiH

8)(vacanam eka) )

(tin (id 3) (mid 4) (word gacCawi) (rt gam1)(prayogaH karwari)(lakAraH

la.t)(puruRaH pra)(vacanam eka)(paxI parasmEpaxI)(XAwuH gamLz)(gaNaH

BvAxiH) )

• Execution

When we execute the rules with the given facts, and check the new

facts, we get the following

(agenda)

0 sati-saptami: f-0

For a total of 1 activation.

CLIPS> (run)

CLIPS> (facts)

The facts are:

f-0 (initial-fact) f-1 (wif (id 1) (mid 1) (word rAmaH) (rt rA1) (XAwuH

rA) (lakAraH la.t) (prayogaH karwari) (puruRaH u) (vacanam bahu)

(paxI parasmEpaxI) (gaNaH axAxiH) (karwA pos nil) (karma pos nil)

(karaNa pos nil) (sampraxAna pos nil) (apAxAna pos nil) (aXikaraNa pos
6.3. Rule Description 45

nil))

f-2 (sup (id 1) (mid 2) (word rAmaH) (rt rAma) (lifgam puM) (viBak-

wiH 1) (vacanam eka) (kArk nil) (viSeRaNa pos nil))

f-3 (sup (id 2) (mid 1) (word vanam) (rt vana) (lifgam napuM) (viBak-

wiH 1) (vacanam eka) (kArk nil) (viSeRaNa pos nil))

f-4 (sup (id 2) (mid 2) (word vanam) (rt vana) (lifgam napuM) (viBak-

wiH 2) (vacanam eka) (kArk nil) (viSeRaNa pos nil))

f-7 (kqw (id 3) (mid 3) (word gacCawi) (kqw prawyayaH nil) (lifgam

swrI) (viBakwiH 8) (vacanam eka) (rt gacCawI) (XAwuH nil) (gaNaH

nil) (karwA pos nil) (karma pos nil))

f-8 (wif (id 3) (mid 4) (word gacCawi) (rt gam1) (XAwuH gamLz)

(lakAraH la.t) (prayogaH karwari) (puruRaH pra) (vacanam eka) (paxI

parasmEpaxI) (gaNaH BvAxiH) (karwA pos nil) (karma pos nil) (karaNa pos

nil) (sampraxAna pos nil) (apAxAna pos nil) (aXikaraNa pos nil))

For a total of 7 facts.

Thus we see that rule has deleted the following two facts corresponding

to the kqxanwas.

(kqw (id 3) (mid 1) (word gacCawi) (rt gacCaw)(lifgam puM)(viBakwiH

7)(vacanam eka) (kqw prawyayaH Sawq)(XAwuH gamLz)(gaNaH BvAxiH)

)
46 Chapter 6. Facts and Rules

(kqw (id 3) (mid 2) (word gacCawi) (rt gacCaw)(lifgam napuM)(viBakwiH

7)(vacanam eka) (kqw prawyayaH Sawq)(XAwuH gamLz)(gaNaH BvAxiH)

Similarly I have written rules for retracting the sMboDn analysis whenever
it is irrelevant. The actual coding is available in Appendix ”(assignkAraka)”

6.3.2 Rule for marking upapada vibhakti

There are six rules corresponding to six upapada EvBEÄs. We look at a very
frequent case of ‘saha’. The pAEZEn’s s/ is ”shyÄ
_þDAn
” (2.3.19). The
implementation of this rule is given below.

• Motivation for the necessity of a rule

Look at the sentence:

rAm
Z sh sFtA vn\ gQCEt.

Here in this sentence sh assigns the third case suffix to rAm. We write
the rule as follows.

• Rule in CLIPS

(defrule assign_trtiyA-upapada
6.3. Rule Description 47

; Define the rule

(declare salience 100)

; priority of this rule is 100

(test (> (count-trtIyAnta sup) 0))

; check if third case vibhakti word exists

(test (> (count-tqtIyA-upapada avy) 0))

; check if there is an indeclinatable demanding the third case.

=> ; execute the following

(delayed-do-for-all-facts

; for all pair of facts such that

((?a avy) (?s sup))

; one is a subanta and the other an avyaya

(and (= ?s:vibhaktiH 3) (= (- ?a:id ?s:id) 1)

(eq (gdbm_lookup "tqtIyA_upapada_list.gdbm" ?a:word) "1"))

; If the subanta has thritiyA vibhakti, the avyaya is adjacent to it and the a

(modify ?s ({\dn kArk} upapala_vibhaktiH))

; then mark the noun as upapada vibhakti

(printout bar "(" ?s:id " " ?a:word " kI upapaxa_viBakwiH)" crlf)))

; print it to a file for further processing

• Explanation
48 Chapter 6. Facts and Rules

It is self explanatory. We declare the salience of this rule to be higher,

so that when there is a conflict, this rule gets priority over the other

rules.

6.3.3 Rule for marking kArk roles

Here we describe a rule for marking the kA in case of karmavAchya


verb forms. In case of kmvAQy, both the kA as well as krZ take
the same EvBEÄ viz. ttFyA. As in ‘rAm
Z bAZ
n vAEl, hyt
’. It is
difficult for a machine to decide which is krZ and which is kA, just by

looking at the words or their analysis. What is needed is extra-linguistic

information that bAZ is an instrument. Since our system does not have

such a knowledge yet, we mark both the words as ‘kA - krZ - vA’.

We give below the rule that marks the abhihita as a karma, and the words

in third case as ‘kA-kara.na’. The rule in CLIPS is with self explanatory

comments.

(defrule assign_{\dn k\381wA\0}-karaNa-vA_karma_karmavAcy

(test (> (count-prathamAnta sup) 0))

; at least one word in nominative case exists

(test (> (count-tqtIyAnta sup) 0))

; at least one word in third case


6.3. Rule Description 49

(test (eq (karmaNi-vA tin) TRUE))

; at least one tin in karmani

=>; execute the following actions

(delayed-do-for-all-facts; for each of the triplate

((?s1 sup) (?s2 sup) (?w tin))

; with two subantas and one tinganta

(and (= ?s1:viBakwiH 3) (= ?s2:viBakwiH 1)

(<> ?s1:id ?s2:id ?w:id)

(eq ?w:prayogaH karmaNi))

; such that one sup in third case, one in nominative

; and the tin in karmani prayoga

(modify ?w ({\dn k\381wA\0}_vA_karaNa_pos ?s1:id)

(karma_pos ?s2:id))

;mark the karta and karma positions

(modify ?s2 ({\dn kArk} karma))

; mark one in nominative as karma

(modify ?s1 ({\dn kArk} {\dn k\381wA\0}_vA_karaNa))

; mark the one in third case as {\dn k\381wA\0}_vA_karaNa

; print the same to a file for further processing

(printout bar "(" ?s1:id " " ?w:word " kA {\dn k\381wA\0}_vA_karaNa)" crlf)

(printout bar "(" ?s2:id " " ?w:word " kA karma)" crlf)
50 Chapter 6. Facts and Rules

))
Chapter 7

Conclusion

The purpose of my thesis is to build a parser for Sanskrit. To decide the

suitability of CLIPS shell for developing a parser, as a pilot study, I collected

various kinds of sentences with single Et½t. These sentences had the ex-
amples from both the uppd EvBEÄs as well as kArk EvBEÄs. I used the
in-house morphological analyser for my work. I also decided not to take the

EZjt as the morphological analyser was not yet fully functional for the
same. Further I also did not consider the q¤F EvBEÄ, since it is used to
denote a kArk as well as noun-noun relations.
I implemented approximately 15 rules for the analysis, and could run all

types of sentences satisfactorily. The appendix lists all the sentences, that

were tested on the machine.

51
52 Chapter 7. Conclusion

To have a full-fledged realistic parser for Sanskrit, still there is a long way

to go. With the current experience of building a simple parser, I think it is

feasible to build a full-fledged parser for Sanskrit.


53
54 Chapter 7. Conclusion
55
56 Chapter 7. Conclusion
57
58 Chapter 7. Conclusion
59
60 Chapter 7. Conclusion
61
62 Chapter 7. Conclusion
63

Assign Karaka Rules

(reset)
;(facts)
; Get the number of sup entries with praWamA
(deffunction count-praWamAnwa (?template)
(length (find-all-facts ((?fct ?template))
(= (fact-slot-value ?fct viBakwiH) 1))))
;check karwari
(deffunction karwari-vA (?template)
(any-factp ((?fct ?template))
(eq (fact-slot-value ?fct prayogaH) karwari)))

;Get the number of verbs with xvikarmaka AkAfkRA


(deffunction count-xvikarmaka-AkAfkRA (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”xvikarmaka XAwu list.gdbm” (fact-slot-value ?fct XAwuH))
”1”))))

; Get the number of verbs with sampraxAna AkAfkRA


(deffunction count-sampraxAna-AkAfkRA (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”sampraxAna XAwu list.gdbm” (fact-slot-value ?fct XAwuH))
”1”))))

; Get the number of verbs with apAxAna AkAfkRA


(deffunction count-apAxAna-AkAfkRA (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”apAxAna XAwu list.gdbm” (fact-slot-value ?fct XAwuH))
”1”))))
64 Chapter 7. Conclusion

;Get the number of xviwIyA-upapaxa entries


(deffunction count-xviwIyA-upapaxa (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”xviwIyA upapaxa list.gdbm” (fact-slot-value ?fct word))
”1”))))

;Get the number of wqwIyA-upapaxa entries


(deffunction count-wqwIyA-upapaxa (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”wqwIyA upapaxa list.gdbm” (fact-slot-value ?fct rt)) ”1”))))

;Get the number of cawurWI-upapaxa entries


(deffunction count-cawurWI-upapaxa (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”cawurWI upapaxa list.gdbm” (fact-slot-value ?fct word))
”1”))))

;Get the number of paFcamI-upapaxa entries


(deffunction count-paFcamI-upapaxa (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”paFcamI upapaxa list.gdbm” (fact-slot-value ?fct rt))
”1”))))

;Get the number of RaRTI-upapaxa entries


(deffunction count-RaRTI-upapaxa (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”RaRTI upapaxa list.gdbm” (fact-slot-value ?fct rt)) ”1”))))

;Get the number of sapwamI-upapaxa entries


(deffunction count-sapwamI-upapaxa (?template)
65

(length (find-all-facts ((?fct ?template))


(eq (gdbm lookup ”sapwamI upapaxa list.gdbm” (fact-slot-value ?fct rt)) ”1”))))

;check karmaNi
(deffunction karmaNi-vA (?template)
(any-factp ((?fct ?template))
(eq (fact-slot-value ?fct prayogaH) karmaNi)))

; Get the number of sup entries with praWamA


(deffunction count-xviwIyAnwa (?template)
(length (find-all-facts ((?fct ?template))
(= (fact-slot-value ?fct viBakwiH) 2))))

; Get the number of sup entries with wqwIyA


(deffunction count-wqwIyAnwa (?template)
(length (find-all-facts ((?fct ?template))
(= (fact-slot-value ?fct viBakwiH) 3))))

; Get the number of sup entries with cawurWI


(deffunction count-cawurWyAnwa (?template)
(length (find-all-facts ((?fct ?template))
(= (fact-slot-value ?fct viBakwiH) 4))))

; Get the number of sup entries with paFcamI


(deffunction count-paFcamyanwa (?template)
(length (find-all-facts ((?fct ?template))
(= (fact-slot-value ?fct viBakwiH) 5))))

; Get the number of sup entries with RaRTI


(deffunction count-RaRTanwa (?template)
66 Chapter 7. Conclusion

(length (find-all-facts ((?fct ?template))


(= (fact-slot-value ?fct viBakwiH) 6))))

; Get the number of sup entries with sapwamI


(deffunction count-sapwamyanwa (?template)
(length (find-all-facts ((?fct ?template))
(= (fact-slot-value ?fct viBakwiH) 7))))

(open ”bar.txt” bar ”a”)

;===================================================
;rAmaH vexam paTawi
; rl1
(defrule assign karwA karma karwqvAcy
(declare (salience 100))
(test (> (count-praWamAnwa sup) 0))
(test (> (count-xviwIyAnwa sup) 0))
(test (eq (karwari-vA wif) TRUE))
(or (test (= (count-xvikarmaka-AkAfkRA wif) 0)) (test (< (count-xviwIyAnwa
sup) 2)))
=>
(delayed-do-for-all-facts
((?s1 sup) (?s2 sup) (?w wif))
(and (= ?s1:viBakwiH 1) (= ?s2:viBakwiH 2) (<> ?s1:id ?s2:id ?w:id)(eq
?w:prayogaH karwari))
(modify ?w (karwA pos ?s1:id) (karma pos ?s2:id))
(modify ?s2 (kAraka karma))
(modify ?s1 (kAraka karwA))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA karwA rl1)” crlf)
67

(printout bar ”(” ?s2:id ” ” ?w:word ” kA karma rl1)” crlf)


))
;;=======================================================
; rl2
(defrule assign karwA karwqvAcy
(declare (salience 100))
(test (> (count-praWamAnwa sup) 0))
(test (= (count-xvikarmaka-AkAfkRA wif) 0))
;(test (= (count-xviwIyAnwa sup) 0))
(test (eq (karwari-vA wif) TRUE))
=>
(delayed-do-for-all-facts
((?s1 sup) (?w wif))
(and (<> ?s1:id ?w:id) (= ?s1:viBakwiH 1) (eq ?w:prayogaH karwari))
(modify ?w (karwA pos ?s1:id))
(modify ?s1 (kAraka karwA))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA karwA rl2)” crlf)
)
)
;========================================================
;rAmeNa vexaH paTyawe
;rl3
(defrule assign karwA-karaNa-vA karma karmavAcy
(declare (salience 100))
(test (> (count-praWamAnwa sup) 0))
(test (> (count-wqwIyAnwa sup) 0))
68 Chapter 7. Conclusion

;(any-factp (?w wif) (?w:prayogaH karmaNi))


(test (eq (karmaNi-vA wif) TRUE))
=>
(delayed-do-for-all-facts
((?s1 sup) (?s2 sup) (?w wif))
(and (= ?s1:viBakwiH 3) (= ?s2:viBakwiH 1) (<> ?s1:id ?s2:id ?w:id)(eq
?w:prayogaH karmaNi))
(modify ?w (karwA pos ?s1:id) (karma pos ?s2:id))
(modify ?s2 (kAraka karma))
(modify ?s1 (kAraka karwA))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA karwA rl3)” crlf)
(printout bar ”(” ?s2:id ” ” ?w:word ” kA karma rl3)” crlf)
))
;;==================================================
;xAwreNa lunAwi
;rl4
(defrule assign karaNa karwqvAcy
(declare (salience 100))
(test (> (count-wqwIyAnwa sup) 0))
(test (eq (karwari-vA wif) TRUE))
=>
(delayed-do-for-all-facts
((?s1 sup) (?w wif))
(and (<> ?s1:id ?w:id) (= ?s1:viBakwiH 3) (eq ?w:prayogaH karwari))
(modify ?w (karaNa pos ?s1:id))
(modify ?s1 (kAraka karaNa))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA karaNa rl4)” crlf)
69

)
)
;========================================================
rAmeN bANena vAliH hanyawe
(defrule assign karaNa karmavAcy
(test (> (count-wqwIyAnwa sup) 0))
=>
(delayed-do-for-all-facts
((?s1 sup) (?s2 sup) (?s3 sup) (?w wif))
(and (= ?s1:viBakwiH 3) (= ?s2:viBakwiH 3) (= ?s3:viBakwiH 1) (<> ?s1:id
?s2:id ?s3:id ?w:id)(eq ?w:prayogaH karmaNi))
(modify ?w (karwA pos ?s1:id) (karaNa pos ?s2:id)(karma pos ?s3:id))
(modify ?s1 (kAraka karwA))
(modify ?s2 (kAraka karaNa))
(modify ?s3 (kAraka karma))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA karwA )” crlf)
(printout bar ”(” ?s2:id ” ” ?w:word ” kA karma )” crlf)
(printout bar ”(” ?s3:id ” ” ?w:word ” kA karaNa )” crlf)
))
;========================================================
;rl5
(defrule assign sampraxAna
(declare (salience 100))
(test (> (count-cawurWyAnwa sup) 0))
(or (test (> (count-xvikarmaka-AkAfkRA wif) 0)) (test (> (count-sampraxAna-
AkAfkRA wif) 0)))
=>
70 Chapter 7. Conclusion

(delayed-do-for-all-facts
((?s1 sup) (?s2 sup) (?w wif))
(and (<> ?s1:id ?s2:id ?w:id) (= ?s1:viBakwiH 4) (or (eq (gdbm lookup
”sampraxAna XAwu list.gdbm” ?w:XAwuH) ”1”) (eq (gdbm lookup ”xvikar-
maka XAwu list.gdbm” ?w:XAwuH) ”1”)))
;(= ?s1:viBakwiH 4)
(modify ?w (sampraxAna pos ?s1:id))
(modify ?s1 (kAraka sampraxAna))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA sampraxAna rl5)” crlf)
)
)

;===================================================
;rl6
(defrule assign apAxAna
(declare (salience 100))
(test (> (count-paFcamyanwa sup) 0))
=>
(delayed-do-for-all-facts
((?s1 sup) (?w wif))
(and (<> ?s1:id ?w:id) (= ?s1:viBakwiH 5))
(modify ?w (apAxAna pos ?s1:id))
(modify ?s1 (kAraka apAxAna))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA apAxAna rl6)” crlf)
)
)
;===================================================
;rl7
71

(defrule assign aXikaraNa


(declare (salience 100))
(test (> (count-sapwamyanwa sup) 0))

=>
(delayed-do-for-all-facts
((?s1 sup) (?w wif))
(and (= ?s1:viBakwiH 7) (<> ?s1:id ?w:id))
(modify ?w (aXikaraNa pos ?s1:id))
(modify ?s1 (kAraka aXikaraNa))
(printout bar ”(” ?s1:id ” ” ?w:word ” kA aXikaraNa rl7)” crlf)
)
)
;========================================================
;rl8
(defrule assign xviwIyA-upapaxa
(test (> (count-xviwIyAnwa sup) 0))
(test (> (count-xviwIyA-upapaxa avy) 0))
=>
(delayed-do-for-all-facts
((?a avy) (?s sup))
(and (= ?s:viBakwiH 2) (= (- ?a:id ?s:id) 1) (eq (gdbm lookup ”xviwIyA upapaxa list.gdbm”
?a:word) ”1”))
(modify ?s (kAraka xviwIyA-upapaxa viBakwiH))
(printout bar ”(” ?s:id ” ” ?a:word ” kA xviwIyA-upapaxa viBakwiH rl8)”
crlf)
)
)
72 Chapter 7. Conclusion

;===================================================
;rl9
(defrule assign wqwIyA-upapaxa
(test (> (count-wqwIyAnwa sup) 0))
(test (> (count-wqwIyA-upapaxa avy sup) 0))
=>
(delayed-do-for-all-facts
((?a avy) (?s sup))
(and (= ?s:viBakwiH 3) (= (- ?a:id ?s:id) 1) (eq (gdbm lookup ”wqwIyA upapaxa list.gdbm”
?a:word) ”1”))
(modify ?s (kAraka wqwIyA-upapaxa viBakwiH))
(printout bar ”(” ?s:id ” ” ?a:word ” kA wqwIyA-upapaxa viBakwiH rl9)”
crlf)))
;===================================================
;rl10
(defrule assign cawurWI-upapaxa
;(declare (salience 100))
(test (> (count-cawurWyAnwa sup) 0))
(test (> (count-cawurWI-upapaxa avy) 0))
=>
(delayed-do-for-all-facts
((?a avy) (?s sup))
(and (= ?s:viBakwiH 4) (= (- ?a:id ?s:id) 1) (eq (gdbm lookup ”cawurWI upapaxa list.gdbm
?a:word) ”1”))
(modify ?s (kAraka cawurWI-upapaxa viBakwiH))
(printout bar ”(” ?s:id ” ” ?a:word ” kA cawurWI-upapaxa viBakwiH rl10)”
crlf)))
;===================================================
73

;rl11
(defrule assign paFcamI-upapaxa
(test (> (count-paFcamyanwa sup) 0))
(test (> (count-paFcamI-upapaxa avy sup) 0))
=>
(delayed-do-for-all-facts
((?a avy) (?s sup))
(and (= ?s:viBakwiH 5) (= (- ?a:id ?s:id) 1) (eq (gdbm lookup ”paFcamI upapaxa list.gdbm”
?a:word) ”1”))
(modify ?s (kAraka paFcamI-upapaxa viBakwiH))
(printout bar ”(” ?s:id ” ” ?a:word ” kA paFcamI-upapaxa viBakwiH rl11)”
crlf)))
;========================================================
;rl12
(defrule assign RaRTI-upapaxa
(test (> (count-RaRTanwa sup) 0))
(test (> (count-RaRTI-upapaxa avy sup) 0))
=>
(delayed-do-for-all-facts
((?a avy) (?s sup))
(and (= ?s:viBakwiH 6) (= (- ?a:id ?s:id) 1) (eq (gdbm lookup ”RaRTI upapaxa list.gdbm”
?a:word) ”1”))
(modify ?s (kAraka RaRTI-upapaxa viBakwiH))
(printout bar ”(” ?s:id ” ” ?a:word ” kA RaRTI-upapaxa viBakwiH rl12)”
crlf)))
;========================================================
;rl13
(defrule assign sapwamI-upapaxa
74 Chapter 7. Conclusion

(test (> (count-sapwamyanwa sup) 0))


(test (> (count-sapwamI-upapaxa avy sup) 0))
=>
(delayed-do-for-all-facts
((?a avy) (?s sup))
(and (= ?s:viBakwiH 7) (= (- ?a:id ?s:id) 1) (eq (gdbm lookup ”sapwamI upapaxa list.gdbm
?a:word) ”1”))
(modify ?s (kAraka sapwamI-upapaxa viBakwiH))
(printout bar ”(” ?s:id ” ” ?a:word ” kA sapwamI-upapaxa viBakwiH rl13)”
crlf)))
;===================================================
;rl14
(defrule assign xvikarmaka-karwqvAcy
(test (> (count-xvikarmaka-AkAfkRA wif) 0))
(test (> (count-xviwIyAnwa sup) 1))
(test (eq (karwari-vA wif) TRUE))
=>
(delayed-do-for-all-facts
((?s1 sup)(?s2 sup)(?s3 sup)(?w wif))
(and (<> ?s1:id ?s2:id ?s3:id ?w:id)(<> ?s2:id ?s3:id ?w:id) (<> ?s3:id
?w:id) (= ?s1:viBakwiH 1) (= ?s2:viBakwiH 2)(= ?s3:viBakwiH 2) (eq ?w:prayogaH
karwari)(eq (gdbm lookup ”xvikarmaka XAwu list.gdbm” ?w:XAwuH) ”1”))
(modify ?w (karma pos ?s2:id ?s3:id))
(modify ?s2 (kAraka gONa-muKya-karma-vA))
(modify ?s3 (kAraka gONa-muKya-karma-vA))
(printout bar ”(” ?s3:id ” ” ?w:XAwuH ” kA gONa-muKya-karma-vA rl14)”
crlf)
(printout bar ”(” ?s1:id ” ” ?w:XAwuH ” kA karwA rl14)” crlf)
75

(printout bar ”(” ?s2:id ” ” ?w:XAwuH ” kA gONa-muKya-karma-vA rl14)”


crlf)))
;========================================================
;rl15
(defrule assign xvikarmaka-karmavAcy
(test (> (count-xvikarmaka-AkAfkRA wif) 0))
(test (eq (karmaNi-vA wif) TRUE))
=>
(delayed-do-for-all-facts
((?s1 sup) (?s2 sup) (?s3 sup) (?w wif))
(and (<> ?s1:id ?s2:id ?w:id)(<> ?s2:id ?s3:id ?w:id)(<> ?s3:id ?w:id)(=
?s1:viBakwiH 3)(= ?s2:viBakwiH 1)(= ?s3:viBakwiH 2)(eq ?w:prayogaH kar-
maNi)(eq (gdbm lookup ”xvikarmaka XAwu list.gdbm” ?w:XAwuH) ”1”))
(modify ?w (karma pos ?s2:id ?s3:id))
(modify ?s2 (kAraka gONa-muKya-karma-vA))
(modify ?s3 (kAraka gONa-muKya-karma-vA))
(printout bar ”(” ?s1:id ” ” ?w:XAwuH ” kA karwA rl15)” crlf)
(printout bar ”(” ?s3:id ” ” ?w:XAwuH ” kA gONa-muKya-karma-vA rl15)”
crlf)
(printout bar ”(” ?s2:id ” ” ?w:XAwuH ” kA gONa-muKya-karma-vA rl15)”
crlf)))

;========================================================
(agenda)
(run)
(facts)
(close bar)
(exit)
76 Chapter 7. Conclusion

Morph Proune Rules

(reset)
;(facts)
; Get the number of sup entries with samboXana
(deffunction count-supkqw-samboXana (?template)
(length (find-all-facts ((?fct ?template))
(= (fact-slot-value ?fct viBakwiH) 8))))

; Check for the presence of sawi sapwami


(deffunction count-sawi-sapwami (?template)
(length (find-all-facts ((?fct ?template))
(and (eq (fact-slot-value ?fct viBakwiH) 7)(eq (fact-slot-value ?fct kqw prawyayaH)
Sawq)))))

; Check the presence of samboXana sUcaka avyayas


(deffunction count-samboXana-avy (?template)
(length (find-all-facts ((?fct ?template))
(eq (gdbm lookup ”samboXana avy wrds list.gdbm” (fact-slot-value ?fct word))
”1” ))))

;
; yasya ca BAvena BAvalakRaNam
(open ”foo.txt” foo ”a”)
(open ”for kAraka.txt” bar ”w”)

(defrule sawi-sapwami
(test (>= (count-sawi-sapwami kqw) 1))
=>
; repeat for all
77

(do-for-all-facts

; kqxanwas
((?w kqw))

; having Sawq+7 form


(and
(eq ?w:kqw prawyayaH Sawq)
(= ?w:viBakwiH 7)

; and no other word with 7 viBakwi in the sentence


(not (any-factp ((?s sup)) (= ?s:viBakwiH 7)))

; and the word under consideration has at least one non-Sawq+7 analysis
(any-factp ((?w1 sup wif)) (= ?w1:id ?w:id))
)

; then retract such analysis and also save this info in a file
(retract ?w)
(printout foo ”(” ?w:id ” ” ?w:mid ”) yasya ca BAvena BAvalakRaNam” crlf
)
)
)
;========================================================

; rAma awra AgacCa


(defrule samboXana-1
(or (test (>= (count-supkqw-samboXana sup) 1))
(test (>= (count-supkqw-samboXana kqw) 1)))
=>
; For each of the wif sup pair
78 Chapter 7. Conclusion

(do-for-all-facts
((?w wif)(?s sup kqw))

; If the wif is in lot or viXilif lakAra


; If the vacanam of the wif matches with the sup
; If the sup is in samboXana
; if the wif is not in uwwama puruRa
; If only one samboXana with these properties exists,

(and (<> ?w:id ?s:id) (or (eq ?w:lakAraH lot) (eq ?w:lakAraH viXilif)) (=
?s:viBakwiH 8) (eq ?w:vacanam ?s:vacanam) (neq ?w:puruRaH u) (or (=
(count-supkqw-samboXana sup) 1) (= (count-supkqw-samboXana kqw) 1)))

; Remove all non samboXana analysis of such a word in samboXana.


(do-for-all-facts
((?s1 sup wif kqw avy))
(and (<> ?s:mid ?s1:mid) (= ?s:id ?s1:id))
(retract ?s1)
(printout foo ”(” ?s1:id ” ” ?s1:mid ”) another analysis is removed ” crlf )
)
)
)
;===================================================
(defrule samboXana-2
(test (>= (count-samboXana-avy avy) 1))
(or (test (>= (count-supkqw-samboXana sup) 1)) (test (>= (count-supkqw-
samboXana kqw) 1)))

=>
; For each of the avy sup pair
79

(do-for-all-facts
((?a avy)(?s sup kqw))

; If the sup is in samboXana


; If the avy is from samboXana-avy

(and (<> ?a:id ?s:id) (gdbm lookup ”samboXana avy wrds list.gdbm” ?a:word)
(= (count-supkqw-samboXana sup) 1) (= (count-supkqw-samboXana kqw)
1))

; Remove all non samboXana analysis of such a word in samboXana.


(do-for-all-facts
((?s1 sup wif kqw avy))
(and (<> ?s:mid ?s1:mid) (= ?s:id ?s1:id))
(retract ?s1)
(printout foo ”(” ?s1:id ” ” ?s1:mid ”) After the samboXana word samboXana
avyaya is there ” crlf)
)
)
)
(run)
(facts)
(do-for-all-facts
((?s sup))
(printout bar ”(sup (id ” ?s:id ”) (mid ” ?s:mid ”) (word ” ?s:word ”)
(rt ” ?s:rt ”)(lifgam ”?s:lifgam ”)(viBakwiH ” ?s:viBakwiH ”)(vacanam ”
?s:vacanam ”) )” crlf )
)
(do-for-all-facts
((?w wif))
80 Chapter 7. Conclusion

(printout bar ”(wif (id ” ?w:id ”) (mid ” ?w:mid ”) (word ” ?w:word ”) (rt
” ?w:rt ”)(XAwuH ” ?w:XAwuH ”)(lakAraH ” ?w:lakAraH ”)(prayogaH ”
?w:prayogaH ”)(puruRaH ” ?w:puruRaH ”)(vacanam ” ?w:vacanam ”)(paxI
” ?w:paxI ”)(gaNaH ” ?w:gaNaH ”))” crlf)
)
(do-for-all-facts
((?w kqw))
(printout bar ”(kqw (id ” ?w:id ”) (mid ” ?w:mid ”) (word ” ?w:word ”)
(kqw prawyayaH ” ?w:kqw prawyayaH ”) (lifgam ” ?w:lifgam ”) (viBakwiH
” ?w:viBakwiH ”) (vacanam ” ?w:vacanam ”) (rt ” ?w:rt ”) (XAwuH ”
?w:XAwuH ”) (gaNaH ” ?w:gaNaH ”))” crlf)
)
(do-for-all-facts
((?w avy))
(printout bar ”(avy (id ” ?w:id ”) (mid ” ?w:mid ”) (word ” ?w:word ”))”
crlf)
)
(do-for-all-facts
((?w waxXiwa))
(printout bar ”(waxXiwa (id ” ?w:id ”) (mid ” ?w:mid ”) (word ” ?w:word ”)
(rt ” ?w:rt ”)(lifgam ” ?w:lifgam ”)(viBakwiH ” ?w:viBakwiH ”)(vacanam”
?w:vacanam ”))” crlf)
)
(close foo)
(close bar)
(exit)
81

LIST OF EXAMPLES:

pA k, p Et
prfnA ECnE
þAsAdAt^ ptEt
pFW upEvfEt
pA k, aodn\ p Et
pA k, aodn\ p t 
pA k n tXl, pQyt 
sd, p Et
bAl, KAdEt
vV, ElKEt
sd, tXl\ p Et
bAlk, g}Am\ gQCEt
{/, kp\ KnEt
BÄ, hEr\ BjEt
rAm, bAZn rAvZ\ hEt
dvd, prfnA v"\ ECnE
bAl, pAdA<yA\ gh\ gQCEt
{/, rjkAy v-/\ ddAEt
rAjA EvþAy gA\ ddAEt
pZ v"At^ ptEt
k Z, goklAt^ aAgQCEt
pAT, pvtAt^ avrohEt
Kg, v"At^ Xyt 
bAl, kV  upEvfEt
sd, aodn\ -TASyA\ p Et
sd, tXl\ p Et
sdn tXl, pQyt 
gO, go¤m^ aAgQCEt
CA/ Z šok, pÕt 
pA k, tXlAn^ p Et
BÄ, g½A\ -pfEt
gopAl, gA\ doE`D py,
vAmn, bEl\ yA t  vsDAm^
pAT, mAZvk\ pTAn\ pQCEt
82 Chapter 7. Conclusion

gz, bAl\ Dm b}t



kqFvl, ajA\ g}Am\ nyEt
bAl, EvAly\ gQCEt
bAl, g\ pWEt
vˆ, upEvfEt
Eff, fk\ p[yEt
bAl, aà\ KAdEt
bAl, aàm^ aE
bAl, aà\ B"yEt
kmkr, kV\ kroEt
atrA (vA\ mA\ hEr,
atr Z hEr\ n sKm^
mAgm^ uByt, v"A, sEt
svt, ayApk\ Ef yA, sEt
EDk^ antvAEdnm^
upypEr BEm\ EvmAnAEn Xyt 
ghm^ aEBt, tZAEn sEt
EvAly\ pErt, CA/A, E‡XEt
v"\ þEt Evott Evt^
ayApk n EvAly, gMyt 
rAm, bAZ n rAvZ\ hEt
a" {, dF&yEt
bAl, Em/ Z sh aAgQCEt
al\ Ev-tr Z
EptA p/Ay Pl\ ddAEt
bAlkAy KXfkrA ro t 
bAElkA p p<y, -phyEt
k\s, k ZAy ‡yEt
Eff, pTAn\ gQCEt
™F gZ fAy nm,
a`ny  -vAhA
Ept<y, -vDA
v"At^ pZ ptEt
pApAt^ jg=st 
DmAt^ þmAEt
83

orAt^ EbBEt
&yAG}At^ r"Et
Ef y, upAyAyAt^ aDFt 
tt<y, pV, BvEt
mAsAt^ aAr<y m G, vqEt
Etl q t{lm^ aE-t
gzZA pAW, E‡yt 
CA/A, fAlA\ þEvfEt
Ev˜As, Em/Ay p-tk\ ddAEt
bAl, vAhnAt^ ptEt
sv kV  upEvfEt
mo"  iQCA aE-t
gopn gA\ v}j, avzyt 
pATn mAZvk, pTAn\ pQt 
Ep/A mAZvk, Dmm^ uQyt
srZ sDA\ "FrEnED, mLyt 
{/Z dvd, ft\ m yt 
kqk Z g}Amm^ ajA nFyt 
gopn vqB, go¤\ E yt 
kqk Z ajA ngrm^ ut 
vV, v"At^ PlAEn avE noEt
gop, vqB\ go¤  hrEt
gopAln gO, py, dt 
vAmn n bEl, vsDA\ yAQyt 
B(y, BAr\ vhEt
B(y, BAr\ nyEt
k\s, k ZAy ‡yEt
sv<y, -vE-t
g}AmAt^ ur, EvAly,
v
{fAKAt^ pv, {/,
g}AmAt^ dr\ ngrm^
g}AmAt^ aEtk\ go¤m^
g}Am-y drAt^ vnm^ aE-t
v"-y EnkVAt^ gO, aE-t
g}Am-y dr\ vnm^ aE-t
84 Chapter 7. Conclusion

g}Am-y drZ vnm^ aE-t


g}Am-y drAt^ vnm^ aE-t
v"-y aEtkAt^ gO, aE-t
v"-y aEtk\ gO, aE-t
v"-y aEtk n gO, aE-t
v"-y aEtk  gO, aE-t
gh-y dr\ EvAly,
ghAt^ dr\ EvAly,
EvAly-y EnkVm^ aApZ,
EvAlyAt^ EnkVm^ aApZ,
aAl-yAt^ n pWEt
t‡\ EvnA kT\ Bojnm^
t
n EvnA tZmEp n lEt
g}Am-y aEtk\ v",
g}Am-y dr\ v",
ngr-y drZ g}Am,
ngr-y aEtk n g}Am,
gh-y drAt^ go¤m^ aE-t
gh-y aEtkAt^ go¤m^ aE-t
g}Am-y aEtk  jlpAt,
ghAt^ dr\ EvAly,
ghAt^ aEtk\ EvAly,
gh-y dr\ EvAly,
gh-y aEtk\ EvAly,
rAâA gg, ft\ d·t 
EptA mAZvkAy Dm b}t 
gz, mAZvkAy Dm fAE-t
kEqk, g}Am\ ajA\ nyEt
gop, gov(s\ go¤\ kqEt
85

Bibliography

• Subba Rao Veluri, ‘The Philosophy of a sentene and its parts’, Mun-
shiram Manoharlal, New Delhi,1969

• Lokamani Dahal, prmlGmÒqA by nAg


f BÓ, Chaukhamba prakashan,
Varanasi, 2006

• Charu Deva Shastri, Panini Re-interpreted, Motilal Banarasidas, Varanasi,


1990

• K V R Krishnacharyulu, BqZsAr smF"A, Raghavaprakasanam, Tiru-


pati, 1996

• N. S. RAMANUJA TATACHARYA,fANdboD mFmA\sA, Institute Francis


De Pondicherry, 2005.

• Brahmadatta Jijnasu, Panini Ashtadhyayi sutrapatha, Ramlal Kapoor


Trust, Delhi, 1998

• Vedavratavarni, ptÒEl mhABA y, Harayana Sahitya samsthan, Ro-


hataka, 2000

• J.G̃arratano and G.Riley, ‘Expert Systems Principles and Program-


ming’, Course Technology, Delhi, 2007

• I-vr dý , a£AAyF, Chaukhamba Samskrita pratishtan, Delhi, 2004


• s(yAndv dvAgFf , pAEZnFyfNdAnfAsnm^, BagvawI leser prints, New
Delhi-65 Ev‡m s\v(sr, 2060.

• EvjypAl EvAvAErED, , kAEfkA, Ramlal kapoor trust, Bagdad, Hariyana,


1997.

• aAndþkAf m
DATF , vAEtk - þkAf,, caukhamba samskrita samsthaan,
Varanasi, 1993.

• pEXt s(yAndvdvAgFf , s\-kt - Ef"Z - srZF , aA Ay rAm fA-/F


âAnpFW, Samskrita nagar, RohinI, Delhi, 1983.

You might also like