hebrew-transliteration 1.3.2 → 2.0.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/LICENSE.md +7 -0
- package/README.md +247 -41
- package/dist/hebCharsTrans.d.ts +6 -2
- package/dist/hebCharsTrans.js +48 -46
- package/dist/hebCharsTrans.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +11 -24
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +485 -7
- package/dist/interfaces.js +155 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/mapChars.d.ts +10 -0
- package/dist/mapChars.js +15 -0
- package/dist/mapChars.js.map +1 -0
- package/dist/qametsQatan.js +15 -37
- package/dist/qametsQatan.js.map +1 -1
- package/dist/remove.d.ts +65 -2
- package/dist/remove.js +42 -14
- package/dist/remove.js.map +1 -1
- package/dist/rules.d.ts +5 -0
- package/dist/rules.js +228 -0
- package/dist/rules.js.map +1 -0
- package/dist/sbl.d.ts +3 -0
- package/dist/sbl.js +58 -0
- package/dist/sbl.js.map +1 -0
- package/dist/schema.d.ts +475 -0
- package/dist/schema.js +160 -0
- package/dist/schema.js.map +1 -0
- package/dist/sequence.d.ts +18 -1
- package/dist/sequence.js +22 -65
- package/dist/sequence.js.map +1 -1
- package/dist/testEach.d.ts +4 -2
- package/dist/testEach.js +19 -47
- package/dist/testEach.js.map +1 -1
- package/dist/titForTat.d.ts +2 -1
- package/dist/titForTat.js +2 -30
- package/dist/titForTat.js.map +1 -1
- package/dist/transliterate.d.ts +45 -2
- package/dist/transliterate.js +90 -17
- package/dist/transliterate.js.map +1 -1
- package/package.json +19 -11
package/LICENSE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2022 Charles Loder
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
# hebrew-transliteration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A JavaScript package for transliterating Hebrew
|
|
4
4
|
|
|
5
5
|
## install
|
|
6
6
|
|
|
7
7
|
### npm
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```bash
|
|
10
|
+
npm install hebrew-transliteration
|
|
11
|
+
```
|
|
10
12
|
|
|
11
13
|
### local
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
You will need to have [node installed](https://nodejs.org/en/download/).
|
|
16
|
+
|
|
17
|
+
Download or clone this repository
|
|
14
18
|
|
|
15
19
|
```bash
|
|
16
20
|
cd hebrew-transliteration
|
|
@@ -23,44 +27,67 @@ npm run build
|
|
|
23
27
|
```javascript
|
|
24
28
|
const heb = require("hebrew-transliteration");
|
|
25
29
|
const transliterate = heb.transliterate;
|
|
26
|
-
|
|
27
30
|
transliterate("אֱלֹהִים");
|
|
28
|
-
//
|
|
31
|
+
// ʾĕlōhîm
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
## DOCS
|
|
32
35
|
|
|
33
|
-
###
|
|
36
|
+
### About
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
heb.transliterate(text, { isSequenced: true, qametsQatan: false, isSimple: false });
|
|
37
|
-
```
|
|
38
|
+
This is a JavaScript package for transliterating Hebrew.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
It exports 3 [functions](#functions):
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
1. [`transliterate()`](#transliterate) — the main function which transliterates Hebrew
|
|
43
|
+
2. [`remove()`](#remove) — removes taamim and optionally removes certain niqqudim
|
|
44
|
+
3. [`sequence()`](#sequence) — sequences Hebrew characters according to the [SBL Hebrew Font Manual](https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf)
|
|
45
|
+
|
|
46
|
+
And it exports 2 [classes](#classes):
|
|
47
|
+
|
|
48
|
+
1. [`Text`](#text) — the [`Text`](https://charlesloder.github.io/havarot/classes/text.Text.html) class from the `havarotjs` package
|
|
49
|
+
2. [`Schema`](#schema) — a schema for transliterating Hebrew
|
|
44
50
|
|
|
45
|
-
|
|
46
|
-
// "kol-hāʿām";
|
|
51
|
+
### Functions
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
// "šālôm";
|
|
53
|
+
#### `transliterate()`
|
|
50
54
|
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
Takes a `string` or [`Text`](#text), and optionally a [`Schema`](#schema) or `Partial<Schema>`
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
heb.transliterate("אֱלֹהִים");
|
|
59
|
+
// "ʾĕlōhîm";
|
|
53
60
|
```
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
If no [`Schema`](#schema) is passed, then the package defaults to SBL's academic style.
|
|
63
|
+
|
|
64
|
+
You can pass in a `Partial<Schema>` that will modify SBL's academic style:
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
heb.transliterate("שָׁלוֹם", { SHIN: "sh" });
|
|
68
|
+
// shālôm
|
|
69
|
+
```
|
|
56
70
|
|
|
57
|
-
|
|
71
|
+
If you need a fully customized transliteration, it is best to use the [`Schema`](#schema) constructor:
|
|
58
72
|
|
|
59
73
|
```javascript
|
|
60
|
-
heb.
|
|
74
|
+
const schema = new heb.Schema({
|
|
75
|
+
ALEF: "'",
|
|
76
|
+
BET: "B",
|
|
77
|
+
...
|
|
78
|
+
QAMETS: "A",
|
|
79
|
+
...
|
|
80
|
+
}) // truncated for brevity
|
|
81
|
+
|
|
82
|
+
heb.transliterate("אָ֣ב", schema)
|
|
83
|
+
// 'AB
|
|
61
84
|
```
|
|
62
85
|
|
|
63
|
-
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
#### `remove()`
|
|
89
|
+
|
|
90
|
+
Takes `string` and options. The default only removes taamim (i.e., accent or cantillation) marks.
|
|
64
91
|
|
|
65
92
|
```javascript
|
|
66
93
|
heb.remove("שָׂרַ֣י אִשְׁתְּךָ֔");
|
|
@@ -75,37 +102,216 @@ heb.remove("שָׂרַ֣י אִשְׁתְּךָ֔", { removeVowels: true, remove
|
|
|
75
102
|
|
|
76
103
|
---
|
|
77
104
|
|
|
78
|
-
|
|
105
|
+
#### `sequence()`
|
|
106
|
+
|
|
107
|
+
Takes a `string`. Returns a string of properly sequenced characters according to the [SBL Hebrew Font manual](https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf) following the pattern of: consonant - dagesh - vowel - ta'am
|
|
108
|
+
|
|
109
|
+
```javascript
|
|
110
|
+
heb.sequence("\u{5D1}\u{5B0}\u{5BC}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5B4}\u{5C1}\u{596}\u{5D9}\u{5EA}");
|
|
111
|
+
// "\u{5D1}\u{5BC}\u{5B0}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5C1}\u{5B4}\u{596}\u{5D9}\u{5EA}"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Classes
|
|
115
|
+
|
|
116
|
+
#### Text
|
|
117
|
+
|
|
118
|
+
The [`Text`](https://charlesloder.github.io/havarot/classes/text.Text.html) class from the [`havarotjs`](https://www.npmjs.com/package/havarotjs) package.
|
|
119
|
+
|
|
120
|
+
This class is used by [`transliterate()`](#transliterate) internally to syllabify Hebrew text, but it is exposed as well.
|
|
79
121
|
|
|
80
122
|
```javascript
|
|
81
|
-
heb.
|
|
123
|
+
const text = new heb.Text("הֲבָרֹות");
|
|
124
|
+
text.syllables;
|
|
125
|
+
// [
|
|
126
|
+
// Syllable { original: "הֲ" },
|
|
127
|
+
// Syllable { original: "בָ" },
|
|
128
|
+
// Syllable { original: "רֹות" }
|
|
129
|
+
// ]
|
|
82
130
|
```
|
|
83
131
|
|
|
84
|
-
|
|
132
|
+
If a `Text` is passed into [`transliterate()`](#transliterate) instead of a `string`, then the syllabification from the `Text` class is used.
|
|
133
|
+
If a `string` is passed in, then syllabification come from the options passed into the [`Schema`](#schema).
|
|
134
|
+
See more under [syllabification](#syllabification).
|
|
135
|
+
|
|
136
|
+
#### Schema
|
|
137
|
+
|
|
138
|
+
A `Schema` is used to define a schema for transliteration. See the [`Schema` source](src/schema.ts) for all available properties.
|
|
139
|
+
|
|
140
|
+
The `Schema` can be divided into a few categories.
|
|
141
|
+
|
|
142
|
+
##### 1) Syllabification
|
|
143
|
+
|
|
144
|
+
The options used for syllabifying Hebrew text can be found [here](https://charlesloder.github.io/havarot/interfaces/text.SylOpts.html)
|
|
145
|
+
|
|
146
|
+
###### Differences between `Text` and `Schema`
|
|
147
|
+
|
|
148
|
+
There are 5 options for syllabification that are the [same as the ones used by the `Text`](https://charlesloder.github.io/havarot/interfaces/text.SylOpts.html) class. The only `Text` syllabification option that `Schema` does not use is `schema` (yes, that's confusing):
|
|
85
149
|
|
|
86
150
|
```javascript
|
|
87
|
-
heb.
|
|
88
|
-
|
|
151
|
+
const text = new heb.Text("חׇכְמָ֣ה", { schema: "traditional" }); // this is okay
|
|
152
|
+
const schema = new heb.Schema({ schema: "traditional" }); // this does nothing
|
|
89
153
|
```
|
|
90
154
|
|
|
91
|
-
|
|
155
|
+
Read more about the syllabification options for the [`Text`](https://charlesloder.github.io/havarot/interfaces/text.SylOpts.html) and a [higher level overview](https://charlesloder.github.io/havarot/pages/Linguistic/syllabification.html)
|
|
92
156
|
|
|
93
|
-
|
|
157
|
+
###### Precedence of `Text` over `Schema`
|
|
94
158
|
|
|
95
|
-
|
|
159
|
+
The syllabification options set by `Schema` are used if a `string` is passed into [`transliterate()`](#transliterate). If a `Text` is passed into [`transliterate()`](#transliterate) instead of a `string`, then the syllabification from the `Text` class is used:
|
|
96
160
|
|
|
97
|
-
|
|
161
|
+
```javascript
|
|
162
|
+
// using default
|
|
163
|
+
heb.transliterate("חָכְמָ֣ה"); // ḥokmâ
|
|
164
|
+
|
|
165
|
+
// using Schema for syllabification
|
|
166
|
+
heb.transliterate("חָכְמָ֣ה", { qametsQatan: false }); // ḥākǝmâ
|
|
167
|
+
|
|
168
|
+
// using Text for syllabification
|
|
169
|
+
heb.transliterate(new heb.Text("חָכְמָ֣ה", { qametsQatan: false })); // ḥākǝmâ
|
|
170
|
+
|
|
171
|
+
// using Schema and Text — Text takes precedence
|
|
172
|
+
heb.transliterate(new heb.Text("חָכְמָ֣ה", { qametsQatan: true }), { qametsQatan: false }); // ḥokmâ
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Note**: `qametsQatan` only converts a regular _qamets_ character; if a [_qamets qatan_ character](https://www.compart.com/en/unicode/U+05C7) is used, it will always be a _qamets qatan_.
|
|
176
|
+
|
|
177
|
+
##### 2) Characters
|
|
98
178
|
|
|
99
|
-
|
|
179
|
+
Most `Schema` properties are for defining single Hebrew characters:
|
|
180
|
+
|
|
181
|
+
```javascript
|
|
182
|
+
heb.transliterate("אָ", { ALEF: "@", QAMETS: "A" });
|
|
183
|
+
// @A
|
|
184
|
+
```
|
|
100
185
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
186
|
+
##### 3) Orthographic Features
|
|
187
|
+
|
|
188
|
+
Some properties are for defining common Hebrew orthographies for:
|
|
189
|
+
|
|
190
|
+
###### _BeGaDKePhaT_
|
|
191
|
+
|
|
192
|
+
There are properties for the digraphs of _BeGaDKePhaT_ letters:
|
|
193
|
+
|
|
194
|
+
- `BET_DAGESH`
|
|
195
|
+
- `GIMEL_DAGESH`
|
|
196
|
+
- `DALET_DAGESH`
|
|
197
|
+
- `KAF_DAGESH`
|
|
198
|
+
- `PE_DAGESH`
|
|
199
|
+
- `TAV_DAGESH`
|
|
200
|
+
|
|
201
|
+
Each one is the consonant character followed by the _dagesh_ character (U+05BC).
|
|
202
|
+
|
|
203
|
+
These are helpful for distinguishing between spirantized forms.
|
|
204
|
+
|
|
205
|
+
```javascript
|
|
206
|
+
heb.transliterate("בְּבֵית", { BET: "b" });
|
|
207
|
+
// bǝbêt
|
|
208
|
+
|
|
209
|
+
heb.transliterate("בְּבֵית", { BET: "v", BET_DAGESH: "b" });
|
|
210
|
+
// bǝvêt
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
###### Matres Lectionis
|
|
214
|
+
|
|
215
|
+
The following properties are for _matres lectionis_:
|
|
216
|
+
|
|
217
|
+
- `HIRIQ_YOD`
|
|
218
|
+
- `TSERE_YOD`
|
|
219
|
+
- `SEGOL_YOD`
|
|
220
|
+
- `SHUREQ`
|
|
221
|
+
- `HOLAM_VAV`
|
|
222
|
+
- `QAMATS_HE`
|
|
223
|
+
- `SEGOL_HE`
|
|
224
|
+
- `TSERE_HE`
|
|
225
|
+
|
|
226
|
+
```javascript
|
|
227
|
+
heb.transliterate("פֶּה", { SEGOL_HE: "é" });
|
|
228
|
+
// pé
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
###### Others
|
|
232
|
+
|
|
233
|
+
There are other orthographic features:
|
|
234
|
+
|
|
235
|
+
- `MS_SUFX` — HEBREW LETTER QAMATS (U+05B8) and YOD (U+05D9) and VAV (U+05D5) יו◌ָ
|
|
236
|
+
- `DIVINE_NAME` — the full form of the divine name - יהוה
|
|
237
|
+
- `SYLLABLE_SEPARATOR` — a syllable separator, usually an empty string
|
|
238
|
+
- `DAGESH_CHAZAQ` — if true, repeats the consonant with the _dagesh_
|
|
239
|
+
|
|
240
|
+
```javascript
|
|
241
|
+
heb.transliterate("שַׁבָּת", { DAGESH_CHAZAQ: true });
|
|
242
|
+
// šabbāt
|
|
243
|
+
|
|
244
|
+
heb.transliterate("שַׁבָּת", { DAGESH_CHAZAQ: false });
|
|
245
|
+
// šabāt
|
|
246
|
+
|
|
247
|
+
heb.transliterate("הָאָֽרֶץ", { SYLLABLE_SEPARATOR: "-" });
|
|
248
|
+
// hā-ʾā-reṣ
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
##### 4) Others
|
|
252
|
+
|
|
253
|
+
###### Additional Features
|
|
254
|
+
|
|
255
|
+
The `ADDITIONAL_FEATURES` property is for defining non-typical Hebrew orthography, example:
|
|
256
|
+
|
|
257
|
+
```javascript
|
|
258
|
+
heb.transliterate("הַזֹּאת", {
|
|
259
|
+
ADDITIONAL_FEATURES: [
|
|
260
|
+
{
|
|
261
|
+
FEATURE: "cluster",
|
|
262
|
+
HEBREW: "זּ",
|
|
263
|
+
TRANSLITERATION: "tz"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
});
|
|
267
|
+
// hatzōʾt
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
- The orthography `זּ` is most often a doubling of the `ZAYIN` (i.e. `'z'` with no _dagesh_, and `'zz'` with a _dagesh chazaq_)
|
|
271
|
+
- In the Romaniote reading tradition, however, the `ZAYIN` is usually transliterated with `'z'` (really `'ζ'`),
|
|
272
|
+
- but a `ZAYIN` followed by a _dagesh_ is transliterated as `'tz'` (really `'τζ'`)
|
|
273
|
+
|
|
274
|
+
Each additional feature consists of 3 parts:
|
|
275
|
+
|
|
276
|
+
1. `FEATURE` — has three options:
|
|
277
|
+
- `"cluster"` — a `cluster` is any combination of a single character and optionally a *dagesh* and vowel.
|
|
278
|
+
- `"syllable"` — a `syllable` is any combination of a multiple characters and a single vowel and optionally a *dagesh*
|
|
279
|
+
- `"word"` — covers everything else
|
|
280
|
+
2. `HEBREW` — the Hebrew text to be transliterated
|
|
281
|
+
3. `TRANSLITERATION` — the text used to transliterate the Hebrew text
|
|
282
|
+
|
|
283
|
+
:warning: this is an experimental property; results may not always meet expectations
|
|
284
|
+
|
|
285
|
+
###### Stress Marker
|
|
286
|
+
|
|
287
|
+
The `STRESS_MARKER` property is an optional mark to indicate stress in transliteration.
|
|
288
|
+
|
|
289
|
+
```javascript
|
|
290
|
+
heb.transliterate("מֶ֣לֶךְ", { STRESS_MARKER: { location: "after-vowel", mark: "\u0301" } });
|
|
291
|
+
// mélek
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
The `location` has four options:
|
|
295
|
+
|
|
296
|
+
- `"before-syllable"`
|
|
297
|
+
- `"after-syllable"`
|
|
298
|
+
- `"before-vowel"`
|
|
299
|
+
- `"after-vowel"`
|
|
300
|
+
|
|
301
|
+
A combining mark (e.g. `"\u0301"`) placed `"after-vowel"` will print on top of the vowel, and placed after a digraph will print on the second vowel.
|
|
302
|
+
|
|
303
|
+
```javascript
|
|
304
|
+
heb.transliterate("בֵּ֣ית", {
|
|
305
|
+
TSERE_YOD: "ei",
|
|
306
|
+
STRESS_MARKER: { location: "after-vowel", mark: "\u0301" }
|
|
307
|
+
});
|
|
308
|
+
// beít
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Live
|
|
312
|
+
|
|
313
|
+
Use it live at [charlesLoder.github.io/hebrewTransliteration](https://charlesloder.github.io/hebrewTransliteration/index.html)
|
|
108
314
|
|
|
109
315
|
## Contributing
|
|
110
316
|
|
|
111
|
-
|
|
317
|
+
See [contributing](./CONTRIBUTING.md)
|
package/dist/hebCharsTrans.d.ts
CHANGED
package/dist/hebCharsTrans.js
CHANGED
|
@@ -3,53 +3,55 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.transliterateMap = void 0;
|
|
4
4
|
exports.transliterateMap = {
|
|
5
5
|
// niqqud
|
|
6
|
-
"\
|
|
7
|
-
"\
|
|
8
|
-
"\
|
|
9
|
-
"\
|
|
10
|
-
"\
|
|
11
|
-
"\
|
|
12
|
-
"\
|
|
13
|
-
"\
|
|
14
|
-
"\
|
|
15
|
-
"\
|
|
16
|
-
"\
|
|
17
|
-
"\
|
|
18
|
-
|
|
6
|
+
"\u{05B0}": "VOCAL_SHEVA",
|
|
7
|
+
"\u{05B1}": "HATAF_SEGOL",
|
|
8
|
+
"\u{05B2}": "HATAF_PATAH",
|
|
9
|
+
"\u{05B3}": "HATAF_QAMATS",
|
|
10
|
+
"\u{05B4}": "HIRIQ",
|
|
11
|
+
"\u{05B5}": "TSERE",
|
|
12
|
+
"\u{05B6}": "SEGOL",
|
|
13
|
+
"\u{05B7}": "PATAH",
|
|
14
|
+
"\u{05B8}": "QAMATS",
|
|
15
|
+
"\u{05B9}": "HOLAM",
|
|
16
|
+
"\u{05BA}": "HOLAM",
|
|
17
|
+
"\u{05BB}": "QUBUTS",
|
|
18
|
+
"\u{05BC}": "DAGESH",
|
|
19
19
|
// "\u{05BD}": "", // HEBREW POINT METEG (U+05BD)
|
|
20
|
-
"\
|
|
21
|
-
"\
|
|
20
|
+
"\u{05BE}": "MAQAF",
|
|
21
|
+
"\u{05C0}": "PASEQ",
|
|
22
|
+
"\u{05C3}": "SOF_PASUQ",
|
|
23
|
+
"\u{05C7}": "QAMATS_QATAN",
|
|
22
24
|
// consonants
|
|
23
|
-
א: "
|
|
24
|
-
ב: "
|
|
25
|
-
ג: "
|
|
26
|
-
ד: "
|
|
27
|
-
ה: "
|
|
28
|
-
ו: "
|
|
29
|
-
ז: "
|
|
30
|
-
ח: "
|
|
31
|
-
ט: "
|
|
32
|
-
י: "
|
|
33
|
-
ך: "
|
|
34
|
-
כ: "
|
|
35
|
-
ל: "
|
|
36
|
-
ם: "
|
|
37
|
-
מ: "
|
|
38
|
-
ן: "
|
|
39
|
-
נ: "
|
|
40
|
-
ס: "
|
|
41
|
-
ע: "
|
|
42
|
-
ף: "
|
|
43
|
-
פ: "
|
|
44
|
-
ץ: "
|
|
45
|
-
צ: "
|
|
46
|
-
ק: "
|
|
47
|
-
ר: "
|
|
48
|
-
ש: "
|
|
49
|
-
ת: "
|
|
50
|
-
"\
|
|
51
|
-
װ: "",
|
|
52
|
-
ױ: "",
|
|
53
|
-
ײ: "" // HEBREW LIGATURE YIDDISH DOUBLE YOD (U+05F2)
|
|
25
|
+
א: "ALEF",
|
|
26
|
+
ב: "BET",
|
|
27
|
+
ג: "GIMEL",
|
|
28
|
+
ד: "DALET",
|
|
29
|
+
ה: "HE",
|
|
30
|
+
ו: "VAV",
|
|
31
|
+
ז: "ZAYIN",
|
|
32
|
+
ח: "HET",
|
|
33
|
+
ט: "TET",
|
|
34
|
+
י: "YOD",
|
|
35
|
+
ך: "FINAL_KAF",
|
|
36
|
+
כ: "KAF",
|
|
37
|
+
ל: "LAMED",
|
|
38
|
+
ם: "FINAL_MEM",
|
|
39
|
+
מ: "MEM",
|
|
40
|
+
ן: "FINAL_NUN",
|
|
41
|
+
נ: "NUN",
|
|
42
|
+
ס: "SAMEKH",
|
|
43
|
+
ע: "AYIN",
|
|
44
|
+
ף: "FINAL_PE",
|
|
45
|
+
פ: "PE",
|
|
46
|
+
ץ: "FINAL_TSADI",
|
|
47
|
+
צ: "TSADI",
|
|
48
|
+
ק: "QOF",
|
|
49
|
+
ר: "RESH",
|
|
50
|
+
ש: "SHIN",
|
|
51
|
+
ת: "TAV" // HEBREW LETTER TAV (U+05EA)
|
|
52
|
+
// "\u{05EF}": "", // HEBREW YOD TRIANGLE (U+05EF)
|
|
53
|
+
// װ: "", // HEBREW LIGATURE YIDDISH DOUBLE VAV (U+05F0)
|
|
54
|
+
// ױ: "", // HEBREW LIGATURE YIDDISH VAV YOD (U+05F1)
|
|
55
|
+
// ײ: "" // HEBREW LIGATURE YIDDISH DOUBLE YOD (U+05F2)
|
|
54
56
|
};
|
|
55
57
|
//# sourceMappingURL=hebCharsTrans.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hebCharsTrans.js","sourceRoot":"","sources":["../src/hebCharsTrans.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"hebCharsTrans.js","sourceRoot":"","sources":["../src/hebCharsTrans.ts"],"names":[],"mappings":";;;AAMa,QAAA,gBAAgB,GAAQ;IACnC,WAAW;IACX,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,aAAa;IACzB,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,QAAQ;IACpB,kDAAkD;IAClD,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,cAAc;IAC1B,eAAe;IACf,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,KAAK,CAAC,6BAA6B;IACtC,kDAAkD;IAClD,wDAAwD;IACxD,qDAAqD;IACrD,uDAAuD;CACxD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Text } from "havarotjs";
|
|
2
|
+
import { transliterate } from "./transliterate";
|
|
3
|
+
import { sequence } from "./sequence";
|
|
4
|
+
import { remove } from "./remove";
|
|
5
|
+
import { Schema } from "./schema";
|
|
6
|
+
export { remove, Schema, sequence, Text, transliterate };
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sequence = exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.removeVowels, removeVowels = _c === void 0 ? false : _c, _d = _b.removeShinDot, removeShinDot = _d === void 0 ? false : _d, _e = _b.removeSinDot, removeSinDot = _e === void 0 ? false : _e;
|
|
15
|
-
var normalized = text.normalize("NFKD");
|
|
16
|
-
var removed = (0, remove_1.Remove)(normalized, { removeVowels: removeVowels, removeShinDot: removeShinDot, removeSinDot: removeSinDot });
|
|
17
|
-
var noMetheg = removed.replace(/\u{05BD}/gu, "");
|
|
18
|
-
var sequenced = (0, sequence_1.Sequence)(noMetheg);
|
|
19
|
-
return sequenced;
|
|
20
|
-
};
|
|
21
|
-
exports.remove = remove;
|
|
22
|
-
var sequence = function (text) {
|
|
23
|
-
var normalized = text.normalize("NFKD");
|
|
24
|
-
return (0, sequence_1.Sequence)(normalized);
|
|
25
|
-
};
|
|
26
|
-
exports.sequence = sequence;
|
|
3
|
+
exports.transliterate = exports.Text = exports.sequence = exports.Schema = exports.remove = void 0;
|
|
4
|
+
const havarotjs_1 = require("havarotjs");
|
|
5
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return havarotjs_1.Text; } });
|
|
6
|
+
const transliterate_1 = require("./transliterate");
|
|
7
|
+
Object.defineProperty(exports, "transliterate", { enumerable: true, get: function () { return transliterate_1.transliterate; } });
|
|
8
|
+
const sequence_1 = require("./sequence");
|
|
9
|
+
Object.defineProperty(exports, "sequence", { enumerable: true, get: function () { return sequence_1.sequence; } });
|
|
10
|
+
const remove_1 = require("./remove");
|
|
11
|
+
Object.defineProperty(exports, "remove", { enumerable: true, get: function () { return remove_1.remove; } });
|
|
12
|
+
const schema_1 = require("./schema");
|
|
13
|
+
Object.defineProperty(exports, "Schema", { enumerable: true, get: function () { return schema_1.Schema; } });
|
|
27
14
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AAME,qFAN1B,gBAAI,OAM0B;AALvC,mDAAgD;AAKP,8FALhC,6BAAa,OAKgC;AAJtD,yCAAsC;AAIb,yFAJhB,mBAAQ,OAIgB;AAHjC,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,qCAAkC;AAEjB,uFAFR,eAAM,OAEQ"}
|