bindu 1.8.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +6 -0
- package/README.md +9 -0
- package/lib/bindu.js +4 -2
- package/lib/pratyahara.js +3 -0
- package/lib/sandhi/{apply-ayadaya → ac/apply-ayadaya}/index.js +1 -1
- package/lib/sandhi/{apply-padantad → ac/apply-padantad}/index.js +1 -1
- package/lib/sandhi/visarga/apply-bhobhago/index.js +47 -0
- package/lib/sandhi/visarga/apply-rori/index.js +39 -0
- package/lib/sandhi/visarga/index.js +7 -0
- package/package.json +1 -1
- /package/lib/sandhi/{apply-dirgha → ac/apply-dirgha}/index.js +0 -0
- /package/lib/sandhi/{apply-guna → ac/apply-guna}/index.js +0 -0
- /package/lib/sandhi/{apply-purvarupa → ac/apply-purvarupa}/index.js +0 -0
- /package/lib/sandhi/{apply-vriddhi → ac/apply-vriddhi}/index.js +0 -0
- /package/lib/sandhi/{apply-yan → ac/apply-yan}/index.js +0 -0
- /package/lib/sandhi/{index.js → ac/index.js} +0 -0
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -45,6 +45,8 @@ places[0].message;
|
|
|
45
45
|
|
|
46
46
|
### Sandhi
|
|
47
47
|
|
|
48
|
+
#### ac
|
|
49
|
+
|
|
48
50
|
- ✅[`sandhi/apply-dirgha`](https://putout.cloudcmd.io/#/gist/0ad8154614be489ae50931109618100a/5ce86f7344b37fd40afeb229e6cb1f668d4f92fd): [अकः सवर्णे दीर्घः](https://www.learnsanskrit.org/vyakarana/sounds/ac-sandhi/#:~:text=a%20new%20rule%3A-,%E0%A4%85%E0%A4%95%E0%A4%83%20%E0%A4%B8%E0%A4%B5%E0%A4%B0%E0%A5%8D%E0%A4%A3%E0%A5%87%20%E0%A4%A6%E0%A5%80%E0%A4%B0%E0%A5%8D%E0%A4%98%E0%A4%83%E0%A5%A4%20%E0%A5%AC.%E0%A5%A7.%E0%A5%A7%E0%A5%A6%E0%A5%A7,-aka%E1%B8%A5%20savar%E1%B9%87e%20d%C4%ABrgha%E1%B8%A5);
|
|
49
51
|
- ✅[`sandhi/apply-yan`](https://putout.cloudcmd.io/#/gist/3091528d3d3eb095032fbec200599df0/c4dcefa2d29fd85f9d3d768b6eaf6934fd5a3fbb): [इको यणचि](https://www.learnsanskrit.org/vyakarana/sounds/vidhi-rules);
|
|
50
52
|
- ✅[`sandhi/apply-guna`](https://putout.cloudcmd.io/#/gist/c057229cbbedf356c1d317022141f8ca/dea60bda78c84f12aef77a9e08bc17274d66c65e): [आद्गुणः](https://www.learnsanskrit.org/panini/vowel/#:~:text=in%20ayav%C4%81y%C4%81v.-,6.1.87,-%E0%A4%86%E0%A4%A6%E0%A5%8D%E0%A4%97%E0%A5%81%E0%A4%A3%E0%A4%83);
|
|
@@ -52,6 +54,10 @@ places[0].message;
|
|
|
52
54
|
- ✅[`sandhi/apply-purvarupa`](https://putout.cloudcmd.io/#/gist/23e2b612a185529ea6823e5f81d35b7d/2ace30ac469be03af1c41911b78d85e85b9a1120): [एकः पूर्वपरयोः](https://www.learnsanskrit.org/panini/vowel/#:~:text=this%20rule%20mean%3F-,%E0%A4%8F%E0%A4%95%E0%A4%83%20%E0%A4%AA%E0%A5%82%E0%A4%B0%E0%A5%8D%E0%A4%B5%E0%A4%AA%E0%A4%B0%E0%A4%AF%E0%A5%8B%E0%A4%83,-eka%E1%B8%A5%20p%C5%ABrvaparayo%E1%B8%A5)
|
|
53
55
|
- ✅[`sandhi/apply-ayadaya`](https://putout.cloudcmd.io/#/gist/39db56c40174f61caed795c2a2dc89a7/dc956c6b0834167d9814ba70036674f4a10f56f9): [आयादयः](https://www.learnsanskrit.org/references/sandhi/vowel/#:~:text=madhu%20iva%20%E2%86%92%20madhviva-,Now,-%2C%20some%20examples%20for)
|
|
54
56
|
- ✅[`sandhi/apply-padantad`](https://putout.cloudcmd.io/#/gist/f73f49bf102a6f2ab34a100ee29f81cc/6b1c3f1595841a08a035437924165e4b8d27896d): [एङः पदान्तादति](https://www.gingersunrise.com/i/133147357/एङ-पदनतदत);
|
|
57
|
+
|
|
58
|
+
#### visarga
|
|
59
|
+
- ✅[`sandhi/apply-rori`](https://putout.cloudcmd.io/#/gist/839c4d49726a2f869dc2854a110001d9/f443ecb1522b2b0f8d18a86eaaf8bdfe9325eaf6): [रो रि।](https://www.learnsanskrit.org/vyakarana/sounds/hal-sandhi/#:~:text=rule%208.3.15%20below%3A-,%E0%A4%B0%E0%A5%8B%20%E0%A4%B0%E0%A4%BF%E0%A5%A4%20%E0%A5%AE.%E0%A5%A9.%E0%A5%A7%E0%A5%AA,-ro%20ri%20);
|
|
60
|
+
- ✅[`sandhi/apply-bhobhago`](https://putout.cloudcmd.io/#/gist/839c4d49726a2f869dc2854a110001d9/f443ecb1522b2b0f8d18a86eaaf8bdfe9325eaf6): [भोभगोअघोअपूर्वस्य योऽशि](https://ashtadhyayi.com/sutraani/8/3/17);
|
|
55
61
|
|
|
56
62
|
#### apply-padantad
|
|
57
63
|
|
|
@@ -79,6 +85,7 @@ bhoati → bhavati
|
|
|
79
85
|
#### apply-ayadaya
|
|
80
86
|
|
|
81
87
|
##### ए
|
|
88
|
+
|
|
82
89
|
```
|
|
83
90
|
ए + अ → अय
|
|
84
91
|
e + a → aya
|
|
@@ -97,6 +104,7 @@ e + o → eyo
|
|
|
97
104
|
```
|
|
98
105
|
|
|
99
106
|
##### ओ
|
|
107
|
+
|
|
100
108
|
```
|
|
101
109
|
ओ + अ → अव
|
|
102
110
|
o + a → av
|
|
@@ -119,6 +127,7 @@ ai + i → āyi
|
|
|
119
127
|
```
|
|
120
128
|
|
|
121
129
|
##### औ
|
|
130
|
+
|
|
122
131
|
```
|
|
123
132
|
औ + अ → आव
|
|
124
133
|
au + a → āvā
|
package/lib/bindu.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import putout from 'putout';
|
|
2
2
|
import Sanscript from '@indic-transliteration/sanscript';
|
|
3
|
-
import * as
|
|
3
|
+
import * as acSandhi from './sandhi/ac/index.js';
|
|
4
|
+
import * as visargaSandhi from './sandhi/visarga/index.js';
|
|
4
5
|
import {postProcess, preProcess} from './process.js';
|
|
5
6
|
|
|
6
7
|
export const toSLP1 = (a) => Sanscript.t(a, 'devanagari', 'slp1');
|
|
@@ -14,7 +15,8 @@ export const bindu = (text, overrides = {}) => {
|
|
|
14
15
|
const {code, places} = putout(source, {
|
|
15
16
|
fix,
|
|
16
17
|
plugins: [
|
|
17
|
-
['sandhi',
|
|
18
|
+
['sandhi/ac', acSandhi],
|
|
19
|
+
['sandhi/visarga', visargaSandhi],
|
|
18
20
|
],
|
|
19
21
|
});
|
|
20
22
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
import {astiAc} from '../../../pratyahara.js';
|
|
3
|
+
|
|
4
|
+
const {remove} = operator;
|
|
5
|
+
const purvasya = [
|
|
6
|
+
'bhoH',
|
|
7
|
+
'bhagoH',
|
|
8
|
+
'aghoH',
|
|
9
|
+
'namaH',
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export const report = () => `bhobhago’gho’pūrvasya yo’śi`;
|
|
13
|
+
|
|
14
|
+
export const fix = ({path, next, name, nextName}) => {
|
|
15
|
+
path.node.name = `${name.slice(0, -2)}o'${nextName}`;
|
|
16
|
+
remove(next);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const traverse = ({push}) => ({
|
|
20
|
+
Identifier(path) {
|
|
21
|
+
const next = path.getNextSibling();
|
|
22
|
+
|
|
23
|
+
if (!next.node)
|
|
24
|
+
return;
|
|
25
|
+
|
|
26
|
+
const {name} = path.node;
|
|
27
|
+
|
|
28
|
+
if (!purvasya.includes(name))
|
|
29
|
+
return;
|
|
30
|
+
|
|
31
|
+
const nextName = next.node.name;
|
|
32
|
+
|
|
33
|
+
const first = nextName
|
|
34
|
+
.at(0)
|
|
35
|
+
.toLowerCase();
|
|
36
|
+
|
|
37
|
+
if (!astiAc(first))
|
|
38
|
+
return;
|
|
39
|
+
|
|
40
|
+
push({
|
|
41
|
+
path,
|
|
42
|
+
next,
|
|
43
|
+
name,
|
|
44
|
+
nextName,
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
import {astiAc} from '../../../pratyahara.js';
|
|
3
|
+
|
|
4
|
+
const {remove} = operator;
|
|
5
|
+
|
|
6
|
+
export const report = () => `ro ri`;
|
|
7
|
+
|
|
8
|
+
export const fix = ({path, next, name, nextName}) => {
|
|
9
|
+
path.node.name = `${name.slice(0, -1)}r${nextName}`;
|
|
10
|
+
remove(next);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const traverse = ({push}) => ({
|
|
14
|
+
Identifier(path) {
|
|
15
|
+
const next = path.getNextSibling();
|
|
16
|
+
|
|
17
|
+
if (!next.node)
|
|
18
|
+
return;
|
|
19
|
+
|
|
20
|
+
const {name} = path.node;
|
|
21
|
+
const nextName = next.node.name;
|
|
22
|
+
|
|
23
|
+
const first = nextName
|
|
24
|
+
.at(0)
|
|
25
|
+
.toLowerCase();
|
|
26
|
+
|
|
27
|
+
const last = name.at(-1);
|
|
28
|
+
|
|
29
|
+
if (last !== 'H' || !astiAc(first))
|
|
30
|
+
return;
|
|
31
|
+
|
|
32
|
+
push({
|
|
33
|
+
path,
|
|
34
|
+
next,
|
|
35
|
+
name,
|
|
36
|
+
nextName,
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
});
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|