Rule based operations in Sanskrit
Chapter 05 - Linguistics: Rule-Based Operations
Introduction
- Examine another aspect of Panini's computational elements.
Rule-Based Processing
- Sanskrit language uses rule-based processing.
- Panini's system applies grammatical conditions to derive words (rule-based engine).
Structure of Rule Application
- A situation is presented.
- Sutras provide the necessary and sufficient conditions to address the situation.
- Basic logic in deriving any word in Sanskrit.
- Sutras resemble the structure: If this condition is satisfied, then perform this operation.
- We saw "iko yan-aci" in mnemonics.
Computer Program Analogy
- The example in mnemonics is like: if this condition is satisfied, do this.
- All sutras are similar to computer instruction programs.
Derivational Grammar
- Sanskrit grammar is entirely derivational.
- Every word can be derived from the start.
- Every conceivable word can be derived using a set of rules in a strict algorithmic fashion.
The Process: Rule Search and Application
- Start from a Base (Verbal Root or Nominal Root).
- The logic can search if any of the 3983 rules can be applied.
- The root goes through some transformation.
- At every stage, inquire if any of the 3983 rules qualify to be applied.
- If a rule qualifies, apply it, and move one step further in the transformation.
- The procedure stops when no more rules can be applied, resulting in a valid final word.
Amenability to Computer Processing
- This rule-based recursive structure is highly amenable to computer-based processing.
- Similar to how a computer takes instructions and uses IF and THEN conditions to derive results.
Flowchart Representation
-
Start
-
Read Inputs:
- Let i = 0 (initial rule counter).
- i = i + 1 (take the first rule).
-
First, check whether end of rules is reached?
- If No, read the Sutra for the ith rule .
- Is Sutra applicable?
- If Yes, Perform operation.
- Apply Transformation; reset counter to 0.
- If No, increment i = i + 1; go to the next sutra.
-
End of 3983 Rules?
-
To find the final result by quitting and by print with logic.
-
The end result being a valid word.
-
(Efficient algorithms avoid scanning all 3983 rules every time.)
Example: Deriving Rama (By Rama)
- Take the noun root Rama and derive the singular form of the third case (which means "by Rama").
- Step 1: Noun root Rama is taken.
- Scanning the set of rules, in 4th chapter, 1st section, 2nd rule of Ashtadhyayi apply to get the first applicable rule.
- 4.1.2 supplies a suffix called “ta” for generating the third case.
- Therefore, we have Rama + ta.
Applying Further Rules
-
Scan again and find the applicable rule.
-
7th chapter, 1st section, 12th sutra becomes eligible.
-
That rule will be applied.
-
It provides conditions for replacing ta with something.
-
Applies in this case and replaces “ta” with ina, as the rule suggests.
-
Now, we have Rama + ina.
-
Scan the rules again.
-
8th chapter, 4th section, 2nd rule becomes applicable.
-
This is actually guna sandhi.
-
Since a is "followed" by i, 6th chapter, 1st section, 87th apply and we find it will be
- “a” + “i" will transform to "e" based a.
-
As per the rule, the vowel a > a + will transform to "e" per guna and if it's apply " it will become Rama +n.
-
Scan rules.
-
Chapter 8 -Section 4 -Rule 2 .
-
n will be n ""
- Rama + n will become Rama + n.
- And that's the stage you have now .
-
The rules will not be applicable ,so the procedure will stops !
-
3rd case Rama is ""Ramena!""
-
What a charm to transform by "a applicable rule""
-
The transformations go until we find "a valid word"""
-
Moment a transformation happen you transform again through scanning of rules
-
This is the charm of Panini's Base Rule Operations!
-
If we remember the application the valid output will be derived.