bindu 1.7.1 → 1.8.1
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 +10 -0
- package/README.md +68 -0
- package/lib/sandhi/apply-ayadaya/index.js +30 -7
- package/lib/sandhi/apply-padantad/index.js +38 -0
- package/lib/sandhi/index.js +2 -0
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -51,6 +51,23 @@ places[0].message;
|
|
|
51
51
|
- ✅[`sandhi/apply-vriddhi`](https://putout.cloudcmd.io/#/gist/7cdc2383c74d7afeb8cfd93df7b5f868/79b1c979be725fc082cf81991b16fac527cfcd7b): [वृद्धिरेचि](https://www.learnsanskrit.org/panini/vowel/#:~:text=and%20%C4%81.-,6.1.88,-%E0%A4%B5%E0%A5%83%E0%A4%A6%E0%A5%8D%E0%A4%A7%E0%A4%BF%E0%A4%B0%E0%A5%87%E0%A4%9A%E0%A4%BF);
|
|
52
52
|
- ✅[`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
53
|
- ✅[`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
|
+
- ✅[`sandhi/apply-padantad`](https://putout.cloudcmd.io/#/gist/f73f49bf102a6f2ab34a100ee29f81cc/6b1c3f1595841a08a035437924165e4b8d27896d): [एङः पदान्तादति](https://www.gingersunrise.com/i/133147357/एङ-पदनतदत);
|
|
55
|
+
|
|
56
|
+
#### apply-padantad
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
ए + अ → एऽ
|
|
60
|
+
e + a → e'
|
|
61
|
+
|
|
62
|
+
ओ + अ → ओऽ
|
|
63
|
+
o + a → o'
|
|
64
|
+
|
|
65
|
+
ऐ + अ → ऐऽ
|
|
66
|
+
ai + a → ai'
|
|
67
|
+
|
|
68
|
+
औ + अ → औऽ
|
|
69
|
+
au + a → au'
|
|
70
|
+
```
|
|
54
71
|
|
|
55
72
|
#### apply-ayadaya
|
|
56
73
|
|
|
@@ -59,6 +76,57 @@ places[0].message;
|
|
|
59
76
|
bhoati → bhavati
|
|
60
77
|
```
|
|
61
78
|
|
|
79
|
+
#### apply-ayadaya
|
|
80
|
+
|
|
81
|
+
##### ए
|
|
82
|
+
```
|
|
83
|
+
ए + अ → अय
|
|
84
|
+
e + a → aya
|
|
85
|
+
|
|
86
|
+
ए + इ → अयि
|
|
87
|
+
e + i → ayi
|
|
88
|
+
|
|
89
|
+
ए + उ → अयु
|
|
90
|
+
e + u → ayu
|
|
91
|
+
|
|
92
|
+
ए + ए → एय
|
|
93
|
+
e + e → eye
|
|
94
|
+
|
|
95
|
+
ए + ओ → एयो
|
|
96
|
+
e + o → eyo
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
##### ओ
|
|
100
|
+
```
|
|
101
|
+
ओ + अ → अव
|
|
102
|
+
o + a → av
|
|
103
|
+
|
|
104
|
+
ओ + इ → अवि
|
|
105
|
+
o + i → avi
|
|
106
|
+
|
|
107
|
+
ओ + उ → अवु
|
|
108
|
+
o + u → avu
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
##### ऐ
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
ऐ + अ → आय
|
|
115
|
+
ai + a → āya
|
|
116
|
+
|
|
117
|
+
ऐ + इ → आयि
|
|
118
|
+
ai + i → āyi
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
##### औ
|
|
122
|
+
```
|
|
123
|
+
औ + अ → आव
|
|
124
|
+
au + a → āvā
|
|
125
|
+
|
|
126
|
+
औ + इ → आवि
|
|
127
|
+
au + i → āvi
|
|
128
|
+
```
|
|
129
|
+
|
|
62
130
|
#### apply-dirgha
|
|
63
131
|
|
|
64
132
|
```
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {operator} from 'putout';
|
|
2
|
+
import {avagraha} from '../../symbols.js';
|
|
2
3
|
|
|
3
4
|
const {remove} = operator;
|
|
4
5
|
|
|
@@ -7,17 +8,30 @@ export const report = () => `ayādayaḥ`;
|
|
|
7
8
|
export const fix = ({path, next, name, nextName}) => {
|
|
8
9
|
remove(next);
|
|
9
10
|
|
|
10
|
-
if (
|
|
11
|
-
path.node.name = `${name
|
|
11
|
+
if (name.endsWith('au')) {
|
|
12
|
+
path.node.name = `${name.slice(0, -1)}Av${nextName}`;
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
if (
|
|
16
|
-
path.node.name = `${name.slice(0, -
|
|
16
|
+
if (name.endsWith('ai')) {
|
|
17
|
+
path.node.name = `${name.slice(0, -2)}Ay${nextName}`;
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
if (name.endsWith('e')) {
|
|
22
|
+
if (nextName.startsWith('a')) {
|
|
23
|
+
path.node.name = `${name.slice(0, -1)}aye${avagraha.code}${nextName.slice(1)}`;
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
path.node.name = `${name.slice(0, -1)}ay${nextName}`;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (name.endsWith('o')) {
|
|
32
|
+
path.node.name = `${name.slice(0, -1)}av${nextName}`;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
21
35
|
};
|
|
22
36
|
|
|
23
37
|
export const traverse = ({push}) => ({
|
|
@@ -30,10 +44,19 @@ export const traverse = ({push}) => ({
|
|
|
30
44
|
const {name} = path.node;
|
|
31
45
|
const nextName = next.node.name;
|
|
32
46
|
|
|
33
|
-
if (
|
|
47
|
+
if (!/([eo]|a[iu])$/.test(name))
|
|
48
|
+
return;
|
|
49
|
+
|
|
50
|
+
if (name.endsWith('e') && !/^[aueio]/.test(nextName))
|
|
51
|
+
return;
|
|
52
|
+
|
|
53
|
+
if (name.endsWith('o') && !/^[aiu]/.test(nextName))
|
|
54
|
+
return;
|
|
55
|
+
|
|
56
|
+
if (name.endsWith('ai') && !/^[ai]/.test(nextName))
|
|
34
57
|
return;
|
|
35
58
|
|
|
36
|
-
if (
|
|
59
|
+
if (name.endsWith('au') && !/^[ai]/.test(nextName))
|
|
37
60
|
return;
|
|
38
61
|
|
|
39
62
|
push({
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
import {avagraha} from '../../symbols.js';
|
|
3
|
+
|
|
4
|
+
const {remove} = operator;
|
|
5
|
+
|
|
6
|
+
export const report = () => `eṅaḥ padāntād ati`;
|
|
7
|
+
|
|
8
|
+
export const fix = ({path, next, name, nextName}) => {
|
|
9
|
+
path.node.name = `${name}${avagraha.code}${nextName.slice(1)}`;
|
|
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.at(0);
|
|
24
|
+
|
|
25
|
+
if (first !== 'a')
|
|
26
|
+
return;
|
|
27
|
+
|
|
28
|
+
if (!/(a[ui]|[eo])$/.test(name))
|
|
29
|
+
return;
|
|
30
|
+
|
|
31
|
+
push({
|
|
32
|
+
path,
|
|
33
|
+
next,
|
|
34
|
+
name,
|
|
35
|
+
nextName,
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
});
|
package/lib/sandhi/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as applyPadantad from './apply-padantad/index.js';
|
|
1
2
|
import * as applyAyadaya from './apply-ayadaya/index.js';
|
|
2
3
|
import * as applyPurvarupa from './apply-purvarupa/index.js';
|
|
3
4
|
import * as applyVriddhi from './apply-vriddhi/index.js';
|
|
@@ -12,4 +13,5 @@ export const rules = {
|
|
|
12
13
|
'apply-vriddhi': applyVriddhi,
|
|
13
14
|
'apply-purvarupa': applyPurvarupa,
|
|
14
15
|
'apply-ayadaya': applyAyadaya,
|
|
16
|
+
'apply-padantad': applyPadantad,
|
|
15
17
|
};
|