Skip to content

putoutjs/bindu

Bindu License NPM version Build Status Coverage Status

image

Bindu (Sanskrit: बिंदु) is a Sanskrit word meaning "point", "drop" or "dot".

Pāṇini Aṣṭādhyāyī set of sanscrit grammar rules.

Install

npm i bindu -g

Usage Example

import {bindu} from 'bindu';

bindu('प्रतिएक');
// returns {code: 'प्रत्येक'}
bindu('द्रौपदी अश्वम्', {
    type: 'iast',
});

// returns {code: 'draupadyaśvam'}
const {places} = bindu('प्रतिएक', {
    fix: false,
});

places[0].message;
// vṛddhirādaic: ie -> ye

Rules

Sandhi

ac

visarga

apply-padantad

ए + अ → एऽ
e + a → e'

ओ + अ → ओऽ
o + a → o'

ऐ + अ → ऐऽ
ai + a → ai'

औ + अ → औऽ
au + a → au'

apply-ayadaya

भोअति → भवति
bhoati → bhavati

apply-ayadaya

ए + अ  → अय
e + a  → aya

ए + इ  → अयि
e + i  → ayi

ए + उ  → अयु
e + u  → ayu

ए + ए  → एय
e + e  → eye

ए + ओ  → एयो
e + o  → eyo
ओ + अ  → अव
o + a  → av

ओ + इ  → अवि
o + i  → avi

ओ + उ  → अवु
o + u  → avu
ऐ + अ  → आय
ai + a  → āya

ऐ + इ  → आयि
ai + i  → āyi
औ + अ  → आव
au + a  → āvā

औ + इ  → आवि
au + i  → āvi

apply-dirgha

अ + अ → आ
a + a → ā

इ + इ → ई
i + i → ī

उ + उ → ऊ
u + u → ū

ऋ + ऋ → ॠ
ṛ + ṛ → ṝ

apply-purvarupa

ए + अ → ए
e + a → e

ओ + अ → ओ 
o + a → o

Example:

अन्ते + अपि → अन्तेऽपि

License

MIT

About

Pāṇini Aṣṭādhyāyī

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published