TH
the-ctrl-grp/SanskritTools
An array of tools for Sanskrit for tasks such as noun declension and verb conjugation.
SanskritTools
Overview
A toolkit for the Sanskrit language. Currently supports noun declension, verb conjugation, and
transliteration from Devanagari to Latin alphabet. Still in development, some features not full implemented or quality controlled.
A few examples
import sanskrit_tools as stst.decline("phala", "neut")| case | singular | dual | plural | |
|---|---|---|---|---|
| 0 | Nom. | phalam | phale | phalāni |
| 1 | Voc. | phala | phale | phalāni |
| 2 | Acc. | phalam | phale | phalāni |
| 3 | Ins. | phalena | phalābhyām | phalaiḥ |
| 4 | Dat. | phalāya | phalābhyām | phalebyaḥ |
| 5 | Abl. | phalāt | phalābhyām | phalebyaḥ |
| 6 | Gen. | phalasya | phalayoḥ | phalānām |
| 7 | Loc. | phale | phalayoḥ | phaleṣu |
st.romanize("कठोपनिषद")'कठोपनिषद → kaṭhopaniṣada'
st.conjugate("nṛt", "4")| Singular | Dual | Plural | |
|---|---|---|---|
| First | nṛtyami | nṛtyavaḥ | nṛtyamaḥ |
| Second | nṛtyasi | nṛtyathaḥ | nṛtyatha |
| Third | nṛtyati | nṛtyataḥ | nṛtyanti |