Sanskrit Sandhi

https://img.shields.io/pypi/v/sandhi Documentation Status Python Version Support GitHub Issues GitHub Followers Twitter Followers

Sanskrit Sandhi Module

Features

  • Form Sandhi using Ashtadhyayi Rules

Install

To install Sanskrit Sandhi, run this command in your terminal:

$ pip install sandhi

Usage

Library

To use Sanskrit Sandhi in a project,

import sandhi

S = sandhi.Sandhi()
sandhi = S.sandhi("रामः", "राजमणिः")

# print(sandhi)
# [['रामो राजमणिः', 'ससजुषो रुः (८।२।६६)-> हशि च (६।१।११४)-> आद् गुणः (६।१।८७)', 'रुत्व-> उत्व-> गुण-सन्धिः']]

Command-line

After installation, a sandhi command is available:

$ sandhi रामः राजमणिः
1. रामो राजमणिः | ससजुषो रुः (८।२।६६)-> हशि च (६।१।११४)-> आद् गुणः (६।१।८७) | रुत्व-> उत्व-> गुण-सन्धिः

To print only the resulting forms (without sutra and sandhi type), use:

$ sandhi --quiet रामः राजमणिः
रामो राजमणिः

Credits