⚙ · ✦
Pāṇini's Machine · अष्टाध्यायी
✦ · ⚙
Around four thousand rules that build a language
Twenty-five centuries ago Pāṇini wrote Sanskrit down as a machine: a sound-alphabet, a compression scheme, and rules that fire in order. Nothing like it existed again until computer science, which borrowed his notation to describe programming languages.
The fourteen sound-lines · शिवसूत्राणि
Every sound of Sanskrit, laid out in fourteen short lines. Each line ends in a marker letter that does no other work — it exists only so that any stretch of sounds can be named by its first sound plus a marker. Tap a name below and watch the stretch light up.
{{ r.num }}
{{ r.note }}
The compression · प्रत्याहाराः
First sound + a marker = a whole class of sounds in two letters. This is why the rules are so short: हल् is every consonant in the language, written with two characters.
{{ selName }}
{{ selGloss }}
{{ selHow }}
{{ r.ref }}
{{ p.deva }}
{{ p.en }}
{{ r.plain }}
{{ r.note }}
it fires
{{ r.exIn }}
➜
{{ r.exEn }}
Rules of this kind, composed to be memorised rather than read.
About the work itself — not a rule
8
chapters (adhyāyas)
32
sections (pādas)
~3,976
rules in all
c. 5th c. BCE
and unrevised since
The rules are ordered, and a later rule can override an earlier one — a conflict-resolution scheme that twentieth-century linguists recognised as a formal grammar. The notation used to define programming languages, Backus–Naur form, is close enough in method that Pāṇini's name is sometimes attached to it.
✦ Wonder · विस्मयः
Feed it a seed and an ending. Watch the word assemble itself.
These are real derivations, and the rules named are the real rules — the same ones a traditional student memorises. Pick a job and step the machine through it.
On the bench
{{ mIn }}
{{ mGoal }}
{{ st.n }}
{{ st.rule }}
{{ st.ref }}
{{ st.plain }}
{{ st.from }}
➜
{{ st.to }}
Out of the machine
{{ mOutEn }}
{{ mMoral }}
Derivations run: {{ ranCount }} of {{ jobCount }}