hebrew-transliteration 2.6.4 → 2.7.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.
@@ -1,578 +1,1588 @@
1
- /*
2
- * class for defining a schema for transliteration
1
+ /**
2
+ * @categoryDescription Consonants
3
+ * Hebrew characters being used as consonants
4
+ *
5
+ * @categoryDescription Vowels
6
+ * Hebrew characters being used as vowels, including the vocal sheva and ligatures
7
+ *
8
+ * @categoryDescription Taamim
9
+ * Hebrew characters that that are used as taamim (i.e. accents)
10
+ *
11
+ * @categoryDescription Marks
12
+ * Hebrew characters that are not consonants, vowels, or taamim, serving some other purpose, such as the dagesh or the paseq
13
+ *
14
+ * @categoryDescription Orthographic Features
15
+ * Multiple Hebrew characters that form a semantic group, like the 3MS Suffix or a consonant with a dagesh
16
+ *
17
+ * @categoryDescription Syllabification
18
+ * Options from havarotjs for syllabifying words
19
+ */
20
+ /**
21
+ * Class for defining a schema for transliteration.
22
+ *
23
+ * @remarks
24
+ * Examples are truncated for brevity.
3
25
  */
4
26
  export class Schema {
5
27
  /**
6
28
  * HEBREW POINT SHEVA (U+05B0) ְ◌
29
+ *
30
+ * @category Vowels
31
+ *
7
32
  * @example
8
- * 'ǝ'
33
+ * ```js
34
+ * const schema = new Schema({
35
+ * // truncated for brevity
36
+ * VOCAL_SHEVA: "ǝ",
37
+ * });
38
+ * transliterate("סְלִ֣ק", schema);
39
+ * // sǝliq
40
+ * ```
9
41
  */
10
42
  VOCAL_SHEVA;
11
43
  /**
12
44
  * HEBREW POINT HATAF SEGOL (U+05B1) ֱ◌
45
+ *
46
+ * @category Vowels
47
+ *
13
48
  * @example
14
- * 'ĕ'
49
+ * ```js
50
+ * const schema = new Schema({
51
+ * // truncated for brevity
52
+ * HATAF_SEGOL: "ĕ",
53
+ * });
54
+ * transliterate("אֱלֹהִ֑ים", schema);
55
+ * // ʾĕlōhîm
56
+ * ```
15
57
  */
16
58
  HATAF_SEGOL;
17
59
  /**
18
60
  * HEBREW POINT HATAF PATAH (U+05B2) ֲ◌
61
+ *
62
+ * @category Vowels
63
+ *
19
64
  * @example
20
- * 'ă'
65
+ * ```js
66
+ * const schema = new Schema({
67
+ * // truncated for brevity
68
+ * HATAF_PATAH: "ă",
69
+ * });
70
+ * transliterate("נַֽעֲשֶׂ֥ה", schema);
71
+ * // naʿăśê
72
+ * ```
21
73
  */
22
74
  HATAF_PATAH;
23
75
  /**
24
76
  * HEBREW POINT HATAF QAMATS (U+05B3) ֳ◌
77
+ *
78
+ * @category Vowels
79
+ *
25
80
  * @example
26
- * 'ŏ'
81
+ * ```js
82
+ * const schema = new Schema({
83
+ * // truncated for brevity
84
+ * HATAF_QAMATS: "ŏ",
85
+ * });
86
+ * transliterate("אֳרָנִים", schema);
87
+ * // ʾŏrānîm
88
+ * ```
27
89
  */
28
90
  HATAF_QAMATS;
29
91
  /**
30
92
  * HEBREW POINT HIRIQ (U+05B4) ִ◌
93
+ *
94
+ * @category Vowels
95
+ *
31
96
  * @example
32
- * 'i'
97
+ * ```js
98
+ * const schema = new Schema({
99
+ * // truncated for brevity
100
+ * HIRIQ: "i",
101
+ * });
102
+ * transliterate("הִנֵּה֩", schema);
103
+ * // hinnê
104
+ * ```
33
105
  */
34
106
  HIRIQ;
35
107
  /**
36
108
  * HEBREW POINT TSERE (U+05B5) ֵ◌
109
+ *
110
+ * @category Vowels
111
+ *
37
112
  * @example
38
- * 'ē'
113
+ * ```js
114
+ * const schema = new Schema({
115
+ * // truncated for brevity
116
+ * TSERE: "ē",
117
+ * });
118
+ * transliterate("אֵשׁ", schema);
119
+ * // ʾēš
120
+ * ```
39
121
  */
40
122
  TSERE;
41
123
  /**
42
124
  * HEBREW POINT SEGOL (U+05B6) ֶ◌
125
+ *
126
+ * @category Vowels
127
+ *
43
128
  * @example
44
- * 'e'
129
+ * ```js
130
+ * const schema = new Schema({
131
+ * // truncated for brevity
132
+ * SEGOL: "e",
133
+ * });
134
+ * transliterate("אֶל", schema);
135
+ * // ʾel
136
+ * ```
45
137
  */
46
138
  SEGOL;
47
139
  /**
48
140
  * HEBREW POINT PATAH (U+05B7) ַ◌
141
+ *
142
+ * @category Vowels
143
+ *
49
144
  * @example
50
- * 'a'
145
+ * ```js
146
+ * const schema = new Schema({
147
+ * // truncated for brevity
148
+ * PATAH: "a",
149
+ * });
150
+ * transliterate("נַ֗עַר", schema);
151
+ * // naʿar
152
+ * ```
51
153
  */
52
154
  PATAH;
53
155
  /**
54
156
  * HEBREW POINT QAMATS (U+05B8) ָ◌
157
+ *
158
+ * @category Vowels
159
+ *
55
160
  * @example
56
- * 'ā'
161
+ * ```js
162
+ * const schema = new Schema({
163
+ * // truncated for brevity
164
+ * QAMATS: "ā",
165
+ * });
166
+ * transliterate("דָבָר֙", schema);
167
+ * // dābār
168
+ * ```
57
169
  */
58
170
  QAMATS;
59
171
  /**
60
172
  * HEBREW POINT HOLAM (U+05B9) ֹ◌
173
+ *
174
+ * @category Vowels
175
+ *
61
176
  * @example
62
- * 'ō'
177
+ * ```js
178
+ * const schema = new Schema({
179
+ * // truncated for brevity
180
+ * HOLAM: "ō",
181
+ * });
182
+ * transliterate("לֹא", schema);
183
+ * // lōʾ
184
+ * ```
63
185
  */
64
186
  HOLAM;
65
187
  /**
66
- * HEBREW POINT HOLAM (U+05BA) ֹ◌
188
+ * HEBREW POINT HOLAM HASER FOR VAV (U+05BA) ֹ◌
189
+ *
190
+ * @category Vowels
191
+ *
67
192
  * @example
68
- * 'ō'
193
+ * ```js
194
+ * const schema = new Schema({
195
+ * // truncated for brevity
196
+ * HOLAM_HASER: "ō",
197
+ * });
198
+ * transliterate("עָוֺן֙", schema);
199
+ * // ʿāwōn
200
+ * ```
201
+ *
202
+ * @remarks
203
+ * See {@link holemHaser} for more about this character
69
204
  */
70
205
  HOLAM_HASER;
71
206
  /**
72
207
  * HEBREW POINT QUBUTS (U+05BB) ֻ◌
208
+ *
209
+ * @category Vowels
210
+ *
73
211
  * @example
74
- * 'u'
212
+ * ```js
213
+ * const schema = new Schema({
214
+ * // truncated for brevity
215
+ * QUBUTS: "u",
216
+ * });
217
+ * transliterate("קֻ֣ם", schema);
218
+ * // qūm
219
+ * ```
75
220
  */
76
221
  QUBUTS;
77
222
  /**
78
223
  * HEBREW POINT DAGESH OR MAPIQ (U+05BC) ּ◌
79
- * @description typically, this will be a blank string
224
+ *
225
+ * @category Marks
226
+ *
227
+ * @example
228
+ * A blank string
229
+ * ```js
230
+ * const schema = new Schema({
231
+ * // truncated for brevity
232
+ * DAGESH: "",
233
+ * });
234
+ * transliterate("כֵּ֑ן", schema);
235
+ * // kēn
236
+ * ```
237
+ *
80
238
  * @example
81
- * ''
239
+ * A character
240
+ * ```js
241
+ * const schema = new Schema({
242
+ * // truncated for brevity
243
+ * DAGESH: ".",
244
+ * });
245
+ * transliterate("כֵּ֑ן", schema);
246
+ * // k.ēn
247
+ * ```
248
+ *
249
+ * @remarks
250
+ * Typically, this should be a blank string.
82
251
  */
83
252
  DAGESH;
84
253
  /**
85
254
  * HEBREW POINT DAGESH OR MAPIQ (U+05BC) ּ◌
86
255
  *
87
- * @description A string or boolean that if true, repeats the consonant with the dagesh.
256
+ * A string or boolean, and if set to `true`, the consonant with the dagesh is repeated.
88
257
  *
89
- * @example string
258
+ * @category Marks
259
+ * @category Orthographic Features
90
260
  *
261
+ * @example
262
+ * As a string
91
263
  * ```js
92
- * transliterate('שַׁבָּת', { DAGESH_CHAZAQ: "\u0301" });
93
- * // 'šab́āt'
264
+ * const schema = new Schema({
265
+ * // truncated for brevity
266
+ * DAGESH_CHAZAQ: "\u0301",
267
+ * });
268
+ * transliterate("שַׁבָּת", schema);
269
+ * // šab́āt
94
270
  * ```
95
271
  *
96
- * @example boolean
272
+ * @example
273
+ * As a boolean
97
274
  * ```js
98
- * transliterate('שַׁבָּת', { DAGESH_CHAZAQ: true });
99
- * // 'šabbāt'
275
+ * const schema = new Schema({
276
+ * // truncated for brevity
277
+ * DAGESH_CHAZAQ: true,
278
+ * });
279
+ * transliterate("שַׁבָּת", schema);
280
+ * // šabbāt
100
281
  * ```
101
282
  */
102
283
  DAGESH_CHAZAQ;
103
284
  /**
104
285
  * HEBREW PUNCTUATION MAQAF (U+05BE) ־◌
286
+ *
287
+ * @category Marks
288
+ * @category Taamim
289
+ *
105
290
  * @example
106
- * '-'
291
+ * ```js
292
+ * const schema = new Schema({
293
+ * // truncated for brevity
294
+ * { MAQAF: "-" }
295
+ * });
296
+ * transliterate("אַל־", schema);
297
+ * // ʾal-
298
+ * ```
107
299
  */
108
300
  MAQAF;
109
301
  /**
110
302
  * HEBREW PUNCTUATION PASEQ (U+05C0) ׀ ◌
111
- * @description if a blank string, two spaces will occur between words
112
- * @example
113
- * '|' or ''
303
+ *
304
+ * @category Marks
305
+ *
114
306
  * @example
115
307
  * ```js
116
- * transliterate('כְּשֶׁ֣בֶת ׀ הַמֶּ֣לֶךְ', { PASEQ: '' });
117
- * // 'kǝšebet hammelek'
308
+ * const schema = new Schema({
309
+ * // truncated for brevity
310
+ * PASEQ: "",
311
+ })
312
+ * transliterate("כְּשֶׁ֣בֶת ׀ הַמֶּ֣לֶךְ", schema);
313
+ * // kǝšebet hammelek
118
314
  * ```
315
+ *
316
+ * @remarks
317
+ * If a blank string, two spaces will occur between words; see example.
119
318
  */
120
319
  PASEQ;
121
320
  /**
122
321
  * HEBREW PUNCTUATION SOF PASUQ (U+05C3) ׃◌
322
+ *
323
+ * @category Marks
324
+ * @category Taamim
325
+ *
123
326
  * @example
124
- * '' or '.'
327
+ * ```js
328
+ * const schema = new Schema({
329
+ * // truncated for brevity
330
+ * SOF_PASUQ: ".",
331
+ * });
332
+ * transliterate("הָאָֽרֶץ׃", schema);
333
+ * // hāʾāreṣ.
334
+ * ```
125
335
  */
126
336
  SOF_PASUQ;
127
337
  /**
128
338
  * HEBREW POINT QAMATS QATAN (U+05C7) ׇ◌
339
+ *
340
+ * @category Vowels
341
+ *
129
342
  * @example
130
- * 'o'
343
+ * ```js
344
+ * const schema = new Schema({
345
+ * // truncated for brevity
346
+ * QAMATS QATAN: "o",
347
+ * });
348
+ * transliterate("כָּל־הָעָ֖ם", schema);
349
+ * // kol-hāʿām
350
+ * ```
351
+ *
352
+ * @remarks
353
+ * See {@link qametsQatan} for details about this character.
131
354
  */
132
355
  QAMATS_QATAN;
133
356
  /**
134
- * HEBREW POINT PATAH (U+05B7) ◌ַ
357
+ * HEBREW POINT PATAH (U+05B7) ◌ַ as a furtive patah
358
+ *
359
+ * @category Vowels
360
+ * @category Orthographic Features
361
+ *
135
362
  * @example
136
- * 'a'
363
+ * ```js
364
+ * const schema = new Schema({
365
+ * // truncated for brevity
366
+ * FURTIVE_PATAH: "a",
367
+ * });
368
+ * transliterate("נֹ֖חַ", schema);
369
+ * // nōaḥ
370
+ * ```
137
371
  */
138
372
  FURTIVE_PATAH;
139
373
  /**
140
374
  * HEBREW POINT HIRIQ (U+05B4) and YOD (U+05D9) י◌ִ
375
+ *
376
+ * @category Vowels
377
+ * @category Orthographic Features
378
+ *
141
379
  * @example
142
- * 'î'
380
+ * ```js
381
+ * const schema = new Schema({
382
+ * // truncated for brevity
383
+ * HIRIQ_YOD: "î",
384
+ * });
385
+ * transliterate("עִ֔יר", schema);
386
+ * // ʿîr
387
+ * ```
143
388
  */
144
389
  HIRIQ_YOD;
145
390
  /**
146
391
  * HEBREW POINT TSERE (U+05B5) and YOD (U+05D9) י◌ֵ
392
+ *
393
+ * @category Vowels
394
+ * @category Orthographic Features
395
+ *
147
396
  * @example
148
- * 'ê'
397
+ * ```js
398
+ * const schema = new Schema({
399
+ * // truncated for brevity
400
+ * TSERE_YOD: "ê",
401
+ * });
402
+ * transliterate("אֵ֤ין", schema);
403
+ * // ʾên
404
+ * ```
149
405
  */
150
406
  TSERE_YOD;
151
407
  /**
152
408
  * HEBREW POINT SEGOL (U+05B6) and YOD (U+05D9) י◌ֶ
409
+ *
410
+ * @category Vowels
411
+ * @category Orthographic Features
412
+ *
153
413
  * @example
154
- * 'ê'
414
+ * ```js
415
+ * const schema = new Schema({
416
+ * // truncated for brevity
417
+ * SEGOL_YOD: "ê",
418
+ * });
419
+ * transliterate("אֱלֹהֶ֑יךָ", schema);
420
+ * // ʾĕlōhêkā
421
+ * ```
155
422
  */
156
423
  SEGOL_YOD;
157
424
  /**
158
425
  * HEBREW LETTER VAV (U+05D5) and DAGESH (U+05BC) וּ
426
+ *
427
+ * @category Vowels
428
+ * @category Orthographic Features
429
+ *
159
430
  * @example
160
- * 'û'
431
+ * ```js
432
+ * const schema = new Schema({
433
+ * // truncated for brevity
434
+ * SHUREQ: "û",
435
+ * });
436
+ * transliterate("קוּם", schema);
437
+ * // qûm
438
+ * ```
161
439
  */
162
440
  SHUREQ;
163
441
  /**
164
442
  * HEBREW LETTER HOLAM (U+05B9) and VAV (U+05D5) ֹו◌
443
+ *
444
+ * @category Vowels
445
+ * @category Orthographic Features
446
+ *
165
447
  * @example
166
- * 'ô'
448
+ * ```js
449
+ * const schema = new Schema({
450
+ * // truncated for brevity
451
+ * HOLAM_VAV: "ô",
452
+ * });
453
+ * transliterate("ס֣וֹא", schema);
454
+ * // sôʾ
455
+ * ```
167
456
  */
168
457
  HOLAM_VAV;
169
458
  /**
170
459
  * HEBREW POINT QAMATS (U+05B8) and HE (U+05D4) ה◌ָ
460
+ *
461
+ * @category Vowels
462
+ * @category Orthographic Features
463
+ *
171
464
  * @example
172
- * 'â'
465
+ * ```js
466
+ * const schema = new Schema({
467
+ * // truncated for brevity
468
+ * QAMATS_HE: "â",
469
+ * });
470
+ * transliterate("עֵצָ֖ה", schema);
471
+ * // ʿēṣâ
472
+ * ```
173
473
  */
174
474
  QAMATS_HE;
175
475
  /**
176
476
  * HEBREW POINT SEGOL (U+05B6) and HE (U+05D4) ה◌ֶ
477
+ *
478
+ * @category Vowels
479
+ * @category Orthographic Features
480
+ *
177
481
  * @example
178
- * 'ê'
482
+ * ```js
483
+ * const schema = new Schema({
484
+ * // truncated for brevity
485
+ * SEGOL_HE: "ê",
486
+ * });
487
+ * transliterate("יִקְרֶ֥ה", schema);
488
+ * // yiqrê
489
+ * ```
179
490
  */
180
491
  SEGOL_HE;
181
492
  /**
182
493
  * HEBREW POINT TSERE (U+05B5) and HE (U+05D4) ה◌ֵ
494
+ *
495
+ * @category Vowels
496
+ * @category Orthographic Features
497
+ *
183
498
  * @example
184
- * 'ê'
499
+ * ```js
500
+ * const schema = new Schema({
501
+ * // truncated for brevity
502
+ * TSERE_HE: "ê",
503
+ * });
504
+ * transliterate("הָאַרְיֵ֔ה", schema);
505
+ * // hāʾaryê
506
+ * ```
185
507
  */
186
508
  TSERE_HE;
187
509
  /**
188
510
  * HEBREW LETTER QAMATS (U+05B8) and YOD (U+05D9) and VAV (U+05D5) יו◌ָ
511
+ *
512
+ * @category Vowels
513
+ * @category Orthographic Features
514
+ *
189
515
  * @example
190
- * 'āyw'
516
+ * ```js
517
+ * const schema = new Schema({
518
+ * // truncated for brevity
519
+ * MS_SUFX: ”āyw”,
520
+ * });
521
+ * transliterate("יָדָ֛יו", schema);
522
+ * // yādāyw
523
+ * ```
191
524
  */
192
525
  MS_SUFX;
193
526
  /**
194
527
  * HEBREW LETTER ALEF (U+05D0) א
528
+ *
529
+ * @category Consonants
530
+ *
195
531
  * @example
196
- * 'ʾ'
532
+ * ```js
533
+ * const schema = new Schema({
534
+ * // truncated for brevity
535
+ * ALEF: "ʾ",
536
+ * });
537
+ * transliterate("אָב", schema);
538
+ * // ʾāb
539
+ * ```
197
540
  */
198
541
  ALEF;
199
542
  /**
200
543
  * HEBREW LETTER BET (U+05D1) ב
544
+ *
545
+ * @category Consonants
546
+ *
201
547
  * @example
202
- * 'b' or 'v'
548
+ * ```js
549
+ * const schema = new Schema({
550
+ * // truncated for brevity
551
+ * BET: "b",
552
+ * });
553
+ * transliterate("בְּבֵית", schema);
554
+ * // bǝbêt
555
+ * ```
203
556
  */
204
557
  BET;
205
558
  /**
206
559
  * HEBREW LETTER BET (U+05D1) and DAGESH (U+05BC) ּב
207
- * @description
208
- * the letter bet with a dagesh kal
209
- * @description
210
- * use when need to distinguish between spirantized forms
560
+ *
561
+ * @category Consonants
562
+ * @category Orthographic Features
563
+ *
211
564
  * @example
212
- * 'b'
565
+ * With only `BET` set
566
+ * ```js
567
+ * const schema = new Schema({
568
+ * // truncated for brevity
569
+ * BET: "b",
570
+ * });
571
+ * transliterate("בְּבֵית", schema);
572
+ * // bǝbêt
573
+ *```
574
+ *
575
+ * @example
576
+ * With `BET` and `BET_DAGESH` set
577
+ * ```js
578
+ * const schema = new Schema({
579
+ * // truncated for brevity
580
+ * BET: "v",
581
+ * BET_DAGESH: "b",
582
+ * });
583
+ * transliterate("בְּבֵית", schema);
584
+ * // bǝvêt
585
+ * ```
586
+ *
587
+ * @remarks
588
+ * The letter bet with a dagesh kal.
589
+ * Use when need to distinguish between spirantized forms
213
590
  */
214
591
  BET_DAGESH;
215
592
  /**
216
593
  * HEBREW LETTER GIMEL (U+05D2) ג
594
+ *
595
+ * @category Consonants
596
+ *
217
597
  * @example
218
- * 'g'
598
+ * ```js
599
+ * const schema = new Schema({
600
+ * // truncated for brevity
601
+ * GIMEL: "g",
602
+ * });
603
+ * transliterate("גַּ֣גּ", schema);
604
+ * // gag
605
+ * ```
219
606
  */
220
607
  GIMEL;
221
608
  /**
222
609
  * HEBREW LETTER GIMEL (U+05D2) and DAGESH (U+05BC) גּ
223
- * @description
224
- * the letter gimel with a dagesh kal
225
- * @description
226
- * use when need to distinguish between spirantized forms
610
+ *
611
+ * @category Consonants
612
+ * @category Orthographic Features
613
+ *
227
614
  * @example
228
- * 'g'
615
+ * With only `GIMEL` set
616
+ * ```js
617
+ * const schema = new Schema({
618
+ * // truncated for brevity
619
+ * GIMEL: "g"
620
+ * });
621
+ * transliterate("גַּ֣ג", schema);
622
+ * // gag
623
+ * ```
624
+ *
625
+ * @example
626
+ * With `GIMEL` and `GIMEL_DAGESH` set
627
+ * ```js
628
+ * const schema = new Schema({
629
+ * // truncated for brevity
630
+ * GIMEL: "gh",
631
+ * GIMEL_DAGESH: "g",
632
+ * });
633
+ * transliterate("גַּ֣ג", schema);
634
+ * // gagh
635
+ * ```
636
+ *
637
+ * @remarks
638
+ * The letter gimel with a dagesh kal.
639
+ * Use when need to distinguish between spirantized forms
229
640
  */
230
641
  GIMEL_DAGESH;
231
642
  /**
232
643
  * HEBREW LETTER DALET (U+05D3) ד
644
+ *
645
+ * @category Consonants
646
+ *
233
647
  * @example
234
- * 'd'
648
+ * ```js
649
+ * const schema = new Schema({
650
+ * // truncated for brevity
651
+ * DALET: "d",
652
+ * });
653
+ * transliterate("דֹּ֣ד", schema);
654
+ * // dōd
655
+ * ```
235
656
  */
236
657
  DALET;
237
658
  /**
238
659
  * HEBREW LETTER DALET (U+05D3) and DAGESH (U+05BC) דּ
239
- * @description
240
- * the letter dalet with a dagesh kal
241
- * @description
242
- * use when need to distinguish between spirantized forms
660
+ *
661
+ * @category Consonants
662
+ * @category Orthographic Features
663
+ *
664
+ * @example
665
+ * With only `DALET` set
666
+ * ```js
667
+ * const schema = new Schema({
668
+ * // truncated for brevity
669
+ * DALET: "d",
670
+ * });
671
+ * transliterate("דֹּ֣ד", schema);
672
+ * // dōd
673
+ * ```
674
+ *
243
675
  * @example
244
- * 'd'
676
+ * With `DALET` and `DALET_DAGESH` set
677
+ * ```js
678
+ * const schema = new Schema({
679
+ * // truncated for brevity
680
+ * DALET: "dh",
681
+ * DALET_DAGESH: "d",
682
+ * });
683
+ * transliterate("דֹּ֣ד", schema);
684
+ * // dōdh
685
+ * ```
686
+ *
687
+ * @remarks
688
+ * The letter dalet with a dagesh kal.
689
+ * Ue when need to distinguish between spirantized forms
245
690
  */
246
691
  DALET_DAGESH;
247
692
  /**
248
693
  * HEBREW LETTER HE (U+05D4) ה
694
+ *
695
+ * @category Consonants
696
+ *
249
697
  * @example
250
- * 'h'
698
+ * ```js
699
+ * const schema = new Schema({
700
+ * // truncated for brevity
701
+ * HE: "h",
702
+ * });
703
+ * transliterate("הֵ֗ם", schema);
704
+ * // hēm
705
+ * ```
251
706
  */
252
707
  HE;
253
708
  /**
254
709
  * HEBREW LETTER VAV (U+05D5) ו
710
+ *
711
+ * @category Consonants
712
+ *
255
713
  * @example
256
- * 'w'
714
+ * ```js
715
+ * const schema = new Schema({
716
+ * // truncated for brevity
717
+ * VAV: "w",
718
+ * });
719
+ * transliterate("וָוִ֖ים", schema);
720
+ * // wāwîm
721
+ * ```
257
722
  */
258
723
  VAV;
259
724
  /**
260
725
  * HEBREW LETTER ZAYIN (U+05D6) ז
726
+ *
727
+ * @category Consonants
728
+ *
261
729
  * @example
262
- * 'z'
730
+ * ```js
731
+ * const schema = new Schema({
732
+ * // truncated for brevity
733
+ * ZAYIN: "z",
734
+ * });
735
+ * transliterate("זֵ֣ד", schema);
736
+ * // zēd
737
+ * ```
263
738
  */
264
739
  ZAYIN;
265
740
  /**
266
741
  * HEBREW LETTER HET (U+05D7) ח
742
+ *
743
+ * @category Consonants
744
+ *
267
745
  * @example
268
- * 'ḥ'
746
+ * ```js
747
+ * const schema = new Schema({
748
+ * // truncated for brevity
749
+ * HET: "ḥ"
750
+ * });
751
+ * transliterate("חַ֣ג", schema);
752
+ * // ḥag
753
+ * ```
269
754
  */
270
755
  HET;
271
756
  /**
272
757
  * HEBREW LETTER TET (U+05D8) ט
758
+ *
759
+ * @category Consonants
760
+ *
273
761
  * @example
274
- * 'ṭ'
762
+ * ```js
763
+ * const schema = new Schema({
764
+ * // truncated for brevity
765
+ * TET: "ṭ",
766
+ * });
767
+ * transliterate("טִֽיט", schema);
768
+ * // ṭîṭ
769
+ * ```
275
770
  */
276
771
  TET;
277
772
  /**
278
773
  * HEBREW LETTER YOD (U+05D9) י
774
+ *
775
+ * @category Consonants
776
+ *
279
777
  * @example
280
- * 'y'
778
+ * ```js
779
+ * const schema = new Schema({
780
+ * // truncated for brevity
781
+ * YOD: "y",
782
+ * });
783
+ * transliterate("יָ֗ד", schema);
784
+ * // yād
785
+ * ```
281
786
  */
282
787
  YOD;
283
788
  /**
284
789
  * HEBREW LETTER FINAL KAF (U+05DA) ך
790
+ *
791
+ * @category Consonants
792
+ *
285
793
  * @example
286
- * 'k' or 'kh'
794
+ * ```js
795
+ * const schema = new Schema({
796
+ * // truncated for brevity
797
+ * FINAL KAF: "k",
798
+ * });
799
+ * transliterate("לֶךְ", schema);
800
+ * // lek
801
+ * ```
287
802
  */
288
803
  FINAL_KAF;
289
804
  /**
290
805
  * HEBREW LETTER KAF (U+05DB) כ
806
+ *
807
+ * @category Consonants
808
+ *
291
809
  * @example
292
- * 'k' or 'kh'
810
+ * ```js
811
+ * const schema = new Schema({
812
+ * // truncated for brevity
813
+ * KAF: "k",
814
+ * });
815
+ * transliterate("כָּ֚כָה", schema);
816
+ * // kākâ
817
+ * ```
293
818
  */
294
819
  KAF;
295
820
  /**
296
821
  * HEBREW LETTER KAF (U+05DB) and DAGESH (U+05BC) כּ
297
- * @description
298
- * the letter kaf with a dagesh kal
299
- * @description
300
- * use when need to distinguish between spirantized forms
822
+ *
823
+ * @category Consonants
824
+ * @category Orthographic Features
825
+ *
301
826
  * @example
302
- * 'k'
827
+ * With only `KAF` set
828
+ * ```js
829
+ * const schema = new Schema({
830
+ * // truncated for brevity
831
+ * KAF: "k",
832
+ * });
833
+ * transliterate("כָּ֚כָה", schema);
834
+ * // kākâ
835
+ * ```
836
+ *
837
+ * @example
838
+ * With `KAF` set and `KAF_DAGESH` set
839
+ * ```js
840
+ * const schema = new Schema({
841
+ * // truncated for brevity
842
+ * KAF: "kh",
843
+ * KAF_DAGESH: "k",
844
+ * });
845
+ * transliterate("כָּ֚כָה", schema);
846
+ * // kākhâ
847
+ * ```
848
+ *
849
+ * @remarks
850
+ * The letter kaf with a dagesh kal.
851
+ * Use when need to distinguish between spirantized forms
303
852
  */
304
853
  KAF_DAGESH;
305
854
  /**
306
855
  * HEBREW LETTER LAMED (U+05DC) ל
856
+ *
857
+ * @category Consonants
858
+ *
307
859
  * @example
308
- * 'l'
860
+ * ```js
861
+ * const schema = new Schema({
862
+ * // truncated for brevity
863
+ * LAMED: "l",
864
+ * });
865
+ * transliterate("עַל", schema);
866
+ * // ʿal
867
+ * ```
309
868
  */
310
869
  LAMED;
311
870
  /**
312
871
  * HEBREW LETTER FINAL MEM (U+05DD) ם
872
+ *
873
+ * @category Consonants
874
+ *
313
875
  * @example
314
- * 'm'
876
+ * ```js
877
+ * const schema = new Schema({
878
+ * // truncated for brevity
879
+ * FINAL MEM: "m",
880
+ * });
881
+ * transliterate("מַ֖יִם", schema);
882
+ * // mayim
883
+ * ```
315
884
  */
316
885
  FINAL_MEM;
317
886
  /**
318
887
  * HEBREW LETTER MEM (U+05DE) מ
888
+ *
889
+ * @category Consonants
890
+ *
319
891
  * @example
320
- * 'm'
892
+ * ```js
893
+ * const schema = new Schema({
894
+ * // truncated for brevity
895
+ * MEM: "m",
896
+ * });
897
+ * transliterate("מַ֖יִם", schema);
898
+ * // mayim
899
+ * ```
321
900
  */
322
901
  MEM;
323
902
  /**
324
903
  * HEBREW LETTER FINAL NUN (U+05DF) ן
904
+ *
905
+ * @category Consonants
906
+ *
325
907
  * @example
326
- * 'n'
908
+ * ```js
909
+ * const schema = new Schema({
910
+ * // truncated for brevity
911
+ * FINAL NUN: "n",
912
+ * });
913
+ * transliterate("נ֔וּן", schema);
914
+ * // nûn
915
+ * ```
327
916
  */
328
917
  FINAL_NUN;
329
918
  /**
330
919
  * HEBREW LETTER NUN (U+05E0) נ
920
+ *
921
+ * @category Consonants
922
+ *
331
923
  * @example
332
- * 'n'
924
+ * ```js
925
+ * const schema = new Schema({
926
+ * // truncated for brevity
927
+ * NUN: "n",
928
+ * });
929
+ * transliterate("נ֔וּן", schema);
930
+ * // nûn
931
+ * ```
333
932
  */
334
933
  NUN;
335
934
  /**
336
935
  * HEBREW LETTER SAMEKH (U+05E1) ס
936
+ *
937
+ * @category Consonants
938
+ *
337
939
  * @example
338
- * 's'
940
+ * ```js
941
+ * const schema = new Schema({
942
+ * // truncated for brevity
943
+ * SAMEKH: "s",
944
+ * });
945
+ * transliterate("ס֥וּס", schema);
946
+ * // sûs
947
+ * ```
339
948
  */
340
949
  SAMEKH;
341
950
  /**
342
951
  * HEBREW LETTER AYIN (U+05E2) ע
952
+ *
953
+ * @category Consonants
954
+ *
343
955
  * @example
344
- * 'ʿ'
956
+ * ```js
957
+ * const schema = new Schema({
958
+ * // truncated for brevity
959
+ * AYIN: "ʿ",
960
+ * });
961
+ * transliterate("עָ֑יִן", schema);
962
+ * // ʿāyin
963
+ * ```
345
964
  */
346
965
  AYIN;
347
966
  /**
348
967
  * HEBREW LETTER FINAL PE (U+05E3) ף
968
+ *
969
+ * @category Consonants
970
+ *
349
971
  * @example
350
- * 'p' or 'f'
972
+ * ```js
973
+ * const schema = new Schema({
974
+ * // truncated for brevity
975
+ * FINAL PE: "p",
976
+ * });
977
+ * transliterate("כַּ֣ף", schema);
978
+ * // kap
979
+ * ```
351
980
  */
352
981
  FINAL_PE;
353
982
  /**
354
983
  * HEBREW LETTER PE (U+05E4) פ
984
+ *
985
+ * @category Consonants
986
+ *
355
987
  * @example
356
- * 'p' or 'f'
988
+ * ```js
989
+ * const schema = new Schema({
990
+ * // truncated for brevity
991
+ * PE: "p",
992
+ * });
993
+ * transliterate("פֶּ֣רֶא חָפְשִׁ֑י", schema);
994
+ * // pereʾ ḥopšî
995
+ * ```
357
996
  */
358
997
  PE;
359
998
  /**
360
999
  * HEBREW LETTER PE (U+05E4) and DAGESH (U+05BC) פּ
361
- * @description
362
- * the letter pe with a dagesh kal
363
- * @description
364
- * use when need to distinguish between spirantized forms
1000
+ *
1001
+ * @category Consonants
1002
+ * @category Orthographic Features
1003
+ *
365
1004
  * @example
366
- * 'p'
1005
+ * With only `PE` set
1006
+ * ```js
1007
+ * const schema = new Schema({
1008
+ * // truncated for brevity
1009
+ * PE_DAGESH: "p",
1010
+ * });
1011
+ * transliterate("פֶּ֣רֶא חָפְשִׁ֑י", schema);
1012
+ * // pereʾ ḥopšî
1013
+ * ```
1014
+ *
1015
+ * @example
1016
+ * With `PE` and `PE_DAGESH` set
1017
+ * ```js
1018
+ * const schema = new Schema({
1019
+ * // truncated for brevity
1020
+ * PE: "f",
1021
+ * PE_DAGESH: "p",
1022
+ * });
1023
+ * transliterate("פֶּ֣רֶא חָפְשִׁ֑י", schema);
1024
+ * // pereʾ ḥofšî
1025
+ * ```
1026
+ *
1027
+ * @remarks
1028
+ * The letter pe with a dagesh kal
1029
+ * Use when need to distinguish between spirantized forms
367
1030
  */
368
1031
  PE_DAGESH;
369
1032
  /**
370
1033
  * HEBREW LETTER FINAL TSADI (U+05E5) ץ
1034
+ *
1035
+ * @category Consonants
1036
+ *
371
1037
  * @example
372
- * 'ṣ'
1038
+ * ```js
1039
+ * const schema = new Schema({
1040
+ * // truncated for brevity
1041
+ * FINAL TSADI: "ṣ",
1042
+ * });
1043
+ * transliterate("צָ֚ץ", schema);
1044
+ * // ṣāṣ
1045
+ * ```
373
1046
  */
374
1047
  FINAL_TSADI;
375
1048
  /**
376
1049
  * HEBREW LETTER TSADI (U+05E6) צ
1050
+ *
1051
+ * @category Consonants
1052
+ *
377
1053
  * @example
378
- * 'ṣ'
1054
+ * ```js
1055
+ * const schema = new Schema({
1056
+ * // truncated for brevity
1057
+ * TSADI: "ṣ",
1058
+ * });
1059
+ * transliterate("צָ֚ץ", schema);
1060
+ * // ṣāṣ
1061
+ * ```
379
1062
  */
380
1063
  TSADI;
381
1064
  /**
382
1065
  * HEBREW LETTER QOF (U+05E7) ק
1066
+ *
1067
+ * @category Consonants
1068
+ *
383
1069
  * @example
384
- * 'q'
1070
+ * ```js
1071
+ * const schema = new Schema({
1072
+ * // truncated for brevity
1073
+ * QOF: "q",
1074
+ * });
1075
+ * transliterate("רַ֥ק", schema);
1076
+ * // raq
1077
+ * ```
385
1078
  */
386
1079
  QOF;
387
1080
  /**
388
1081
  * HEBREW LETTER RESH (U+05E8) ר
1082
+ *
1083
+ * @category Consonants
1084
+ *
389
1085
  * @example
390
- * 'r'
1086
+ * ```js
1087
+ * const schema = new Schema({
1088
+ * // truncated for brevity
1089
+ * RESH: "r",
1090
+ * });
1091
+ * transliterate("רַ֥ק", schema);
1092
+ * // raq
1093
+ * ```
391
1094
  */
392
1095
  RESH;
393
1096
  /**
394
1097
  * HEBREW LETTER SHIN (U+05E9) and SHIN DOT (U+05C1) שׁ
1098
+ *
1099
+ * @category Consonants
1100
+ * @category Orthographic Features
1101
+ *
395
1102
  * @example
396
- * 'š'
1103
+ * ```js
1104
+ * const schema = new Schema({
1105
+ * // truncated for brevity
1106
+ * SHIN: "š",
1107
+ * });
1108
+ * transliterate("שֵׁ֖ן", schema);
1109
+ * // šēn
1110
+ * ```
397
1111
  */
398
1112
  SHIN;
399
1113
  /**
400
1114
  * HEBREW LETTER SHIN (U+05E9) and SIN DOT (U+05C2) שׁ
1115
+ *
1116
+ * @category Consonants
1117
+ * @category Orthographic Features
1118
+ *
401
1119
  * @example
402
- * 'ś'
1120
+ * ```js
1121
+ * const schema = new Schema({
1122
+ * // truncated for brevity
1123
+ * SIN: "ś",
1124
+ * });
1125
+ * transliterate("כַּשְׂדִּ֔ים", schema);
1126
+ * // kaśdîm
1127
+ * ```
403
1128
  */
404
1129
  SIN;
405
1130
  /**
406
1131
  * HEBREW LETTER TAV (U+05EA) ת
1132
+ *
1133
+ * @category Consonants
1134
+ *
407
1135
  * @example
408
- * 't' or 'th'
1136
+ * ```js
1137
+ * const schema = new Schema({
1138
+ * // truncated for brevity
1139
+ * TAV: "t",
1140
+ * });
1141
+ * transliterate("תֵּ֛ת", schema);
1142
+ * // tēt
1143
+ * ```
409
1144
  */
410
1145
  TAV;
411
1146
  /**
412
1147
  * HEBREW LETTER TAV (U+05EA) and DAGESH (U+05BC) תּ
413
- * @description
414
- * the letter tav with a dagesh kal
415
- * @description
416
- * use when need to distinguish between spirantized forms
1148
+ *
1149
+ * @category Consonants
1150
+ * @category Orthographic Features
1151
+ *
1152
+ * @example
1153
+ * With only `TAV` set
1154
+ * ```js
1155
+ * const schema = new Schema({
1156
+ * // truncated for brevity
1157
+ * TAV: "t",
1158
+ * });
1159
+ * transliterate("תֵּ֛ת", schema);
1160
+ * // tēt
1161
+ * ```
1162
+ *
417
1163
  * @example
418
- * 't'
1164
+ * With `TAV` and `TAV_DAGESH` set
1165
+ * ```js
1166
+ * const schema = new Schema({
1167
+ * // truncated for brevity
1168
+ * TAV: "th",
1169
+ * TAV_DAGESH: "t",
1170
+ * });
1171
+ * transliterate("תֵּ֛ת", schema);
1172
+ * // tēth
1173
+ * ```
1174
+ *
1175
+ * @remarks
1176
+ * The letter tav with a dagesh kal.
1177
+ * Use when need to distinguish between spirantized forms
419
1178
  */
420
1179
  TAV_DAGESH;
421
1180
  /**
422
- * define additional sequences of characters
1181
+ * Rules for customized output
1182
+ *
1183
+ * This property is an array of objects with the following properties each:
1184
+ * - `FEATURE`: the type of feature that the rule is checking — "word", "syllable", or "cluster"
1185
+ * - `HEBREW`: the Hebrew text that the rule matches, given as a string or Regex
1186
+ * - `PASS_THROUGH?`: An optional property; `true` if the rule should pass the characters of the result of the `TRANSLITERATION` callback to the be mapped to the schema
1187
+ * - `TRANSLITERATION`: the output of the rule, either a string or a callback whose properties differ based on the `FEATURE`
1188
+ *
1189
+ * The examples give the best indication of how to use these features, though see the particular types for more details
1190
+ *
1191
+ * @category Orthographic Features
423
1192
  *
424
- * ⚠️ there may be unpredictable results
1193
+ * @example
1194
+ * `FEATURE` is `"word"` and `TRANSLITERATION` is a string
1195
+ * ```js
1196
+ * const schema = new Schema({
1197
+ * // truncated for brevity
1198
+ * ADDITIONAL_FEATURES: [{
1199
+ * FEATURE: "word",
1200
+ * HEBREW: "הָאָרֶץ",
1201
+ * TRANSLITERATION: "The Earth"
1202
+ * }]
1203
+ })
1204
+ * transliterate("וְאֵ֥ת הָאָֽרֶץ", schema);
1205
+ * // wǝʾēt The Earth
1206
+ * ```
425
1207
  *
426
1208
  * @example
427
- * [{
428
- * FEATURE: 'cluster',
429
- * HEBREW: 'זּ',
430
- * TRANSLITERATION: 'tz'
431
- * }]
1209
+ * `FEATURE` is `"word"` and `TRANSLITERATION` is a callback
1210
+ * ```js
1211
+ * const schema = new Schema({
1212
+ * // truncated for brevity
1213
+ * ADDITIONAL_FEATURES: [{
1214
+ * HEBREW: "שְׁתַּיִם",
1215
+ * FEATURE: "word",
1216
+ * TRANSLITERATION: function (_word, _hebrew, schema) {
1217
+ * return (
1218
+ * schema["SHIN"] +
1219
+ * (schema["TAV_DAGESH"] ?? schema["TAV"]) +
1220
+ * schema["PATAH"] +
1221
+ * schema["YOD"] +
1222
+ * schema["HIRIQ"] +
1223
+ * schema["FINAL_MEM"]
1224
+ * );
1225
+ * }
1226
+ * }]
1227
+ * });
1228
+ * transliterate("שְׁתַּיִם", schema);
1229
+ * // štayim
1230
+ * ```
1231
+ * @example
1232
+ * `FEATURE` is `"syllable"` and `TRANSLITERATION` is a string
1233
+ * ```js
1234
+ * const schema = new Schema({
1235
+ * // truncated for brevity
1236
+ * ADDITIONAL_FEATURES: [{
1237
+ * FEATURE: "syllable",
1238
+ * HEBREW: /יּ(?![\u{05B4}-\u{05BB}])/u, // a yod with a dagesh, not followed by a vowel character
1239
+ * TRANSLITERATION: "Y"
1240
+ * }]
1241
+ * });
1242
+ * transliterate("מְחִיּיָאֵ֗ל", schema);
1243
+ * // mǝḥiYyāʾēl
1244
+ * ```
1245
+ *
1246
+ * @example
1247
+ * `FEATURE` is `"syllable"` and `TRANSLITERATION` is a callback
1248
+ * ```js
1249
+ * const schema = new Schema({
1250
+ * // truncated for brevity
1251
+ * ADDITIONAL_FEATURES: [{
1252
+ * FEATURE: "syllable",
1253
+ * HEBREW: /\u{05C7}/u,
1254
+ * TRANSLITERATION: (syllable) => {
1255
+ * // If the syllable contains a qamets qatan character (U+05C7), check the text of the next syllable
1256
+ * const next = syllable?.next?.value?.text;
1257
+ *
1258
+ * // If the next syllable includes a hateph qamets, then replace the qamets qatan with a regular qamets
1259
+ * if (next && next.includes("\u05B3")) {
1260
+ * return syllable.text.replace("\u{05C7}", "\u{05B8}");
1261
+ * }
1262
+ * return syllable.text;
1263
+ * }
1264
+ * }]
1265
+ * });
1266
+ * transliterate("נָעֳמִי֙", schema);
1267
+ * // nāʿŏmî
1268
+ * ```
1269
+ *
1270
+ * @example
1271
+ * `FEATURE` is `"cluster"` and `TRANSLITERATION` is a string
1272
+ * ```js
1273
+ * const schema = new Schema({
1274
+ * // truncated for brevity
1275
+ * ADDITIONAL_FEATURES: [{
1276
+ * FEATURE: "cluster",
1277
+ * HEBREW: "זּ",
1278
+ * TRANSLITERATION: "tz"
1279
+ * }]
1280
+ * });;
1281
+ * transliterate("הַזֹּאת", schema);
1282
+ * // hatzōʾt
1283
+ * ```
1284
+ *
1285
+ * @example
1286
+ * `FEATURE` is "cluster" and `TRANSLITERATION` is a callback
1287
+ * ```js
1288
+ * const schema = new Schema({
1289
+ * // truncated for brevity
1290
+ * TAV_DAGESH: "tʰ",,
1291
+ * ADDITIONAL_FEATURES: [{
1292
+ * FEATURE: 'cluster',
1293
+ * HEBREW: /תּ(?!\u{05B0})/u,
1294
+ * TRANSLITERATION: (cluster, _, schema) => {
1295
+ * // Because the *_DAGESH value is a digraph, we need to replace the first character
1296
+ * // or it will be doubled in rules.ts as "tʰtʰ"
1297
+ *
1298
+ *
1299
+ * // If there is a dagesh, but it is the beginning of the word
1300
+ * // we can return the text, as the character w/ the dagesh will not be doubled
1301
+ * if (!cluster.prev || cluster.prev.value?.isNotHebrew) {
1302
+ * return cluster.text;
1303
+ * }
1304
+ *
1305
+ * // If there is a dagesh, it may be that it is a dagesh qal (i.e. lene)
1306
+ * // If it is a dagesh lene, then like the beginning of the word,
1307
+ * // the character w/ the dagesh will not be doubled
1308
+ * const prevCoda = cluster.syllable?.prev?.value?.codaWithGemination;
1309
+ * if (!prevCoda?.includes("ת",)) {
1310
+ * return cluster.text;
1311
+ * }
1312
+ *
1313
+ * // convert "tʰtʰ" to "ttʰ"
1314
+ * const noAspiration = schema['TAV_DAGESH']?.replace("ʰ",, '') ?? '';
1315
+ * return cluster.text.replace("תּ",,`${noAspiration + schema['TAV_DAGESH']}`);
1316
+ * },
1317
+ * }]
1318
+ * });
1319
+ * transliterate("וַתֵּ֨שֶׁב", schema);
1320
+ * // wattʰēšeb
1321
+ * ```
1322
+ *
432
1323
  */
433
1324
  ADDITIONAL_FEATURES;
434
1325
  /**
435
- * the full form of the divine name - יהוה
1326
+ * The full form of the divine name - יהוה
1327
+ *
1328
+ * @category Orthographic Features
1329
+ *
436
1330
  * @example
437
- * 'yhwh'
1331
+ * ```js
1332
+ * const schema = new Schema({
1333
+ * // truncated for brevity
1334
+ * DIVINE_NAME: "yhwh",
1335
+ * });
1336
+ * transliterate("יְהֹוָ֗ה", schema);
1337
+ * // yhwh
1338
+ * ```
438
1339
  */
439
1340
  DIVINE_NAME;
440
1341
  /**
441
- * the full form of the divine name pointed as 'elohim
1342
+ * The full form of the divine name pointed as 'elohim
1343
+ *
1344
+ * @category Orthographic Features
1345
+ *
1346
+ * @example
1347
+ * ```js
1348
+ * const schema = new Schema({
1349
+ * // truncated for brevity
1350
+ * DIVINE_NAME_ELOHIM: "ʾĕlōhîm",
1351
+ * });
1352
+ * transliterate("יֱהֹוִה", schema);
1353
+ * // ʾĕlōhîm
1354
+ * ```
442
1355
  *
443
- * @description
444
- * matches on the forms:
1356
+ * @remarks
1357
+ * Matches on the forms:
445
1358
  * - יֱהֹוִה
446
1359
  * - יֱהוִה
447
1360
  * - יְהֹוִה
448
1361
  * - יְהוִה
449
- *
450
- * If undefined, defaults to `DIVINE_NAME`
451
- *
452
- * @example
453
- * 'ʾelōhim'
1362
+ * If `undefined`, defaults to value of {@link DIVINE_NAME}
454
1363
  */
455
1364
  DIVINE_NAME_ELOHIM;
456
1365
  /**
457
- * a syllable separator, usually an empty string
458
- * @example
459
- * '' or '-'
1366
+ * A syllable separator, usually an empty string
1367
+ *
1368
+ * @category Orthographic Features
1369
+ *
460
1370
  * @example
461
1371
  * ```js
462
- * transliterate('הָאָֽרֶץ', { SYLLABLE_SEPARATOR: '-' });
463
- * // 'hā-ʾā-reṣ'
1372
+ * const schema = new Schema({
1373
+ * // truncated for brevity
1374
+ * SYLLABLE_SEPARATOR: "-",
1375
+ * });
1376
+ * transliterate('הָאָֽרֶץ', schema);
1377
+ * // hā-ʾā-reṣ
464
1378
  * ```
465
1379
  */
466
1380
  SYLLABLE_SEPARATOR;
467
1381
  /**
468
- * a mark for indentifying the stressed syllable
1382
+ * A mark for indentifying the stressed syllable
1383
+ *
1384
+ * @category Orthographic Features
469
1385
  *
470
- * @description
471
- * taamim are needed in the Hebrew text to correctly identify stress
472
- * @example
473
- * 'ˈ' or '\u0341'
474
1386
  * @example
475
1387
  * ```js
476
- * transliterate('מֶ֣לֶךְ', {
1388
+ * const schema = new Schema({
1389
+ * // truncated for brevity
477
1390
  * STRESS_MARKER: {
478
- * location: 'after-vowel',
479
- * mark: '\u0301'
480
- * }
1391
+ * location: "after-vowel",
1392
+ * mark: "\u0301",
1393
+ * },
481
1394
  * });
482
- * // 'mélek'
1395
+ * transliterate("מֶ֣לֶךְ", schema);
1396
+ * // mélek
483
1397
  * ```
1398
+ *
1399
+ * @remarks
1400
+ * Taamim are needed in the Hebrew text to correctly identify stress.
484
1401
  */
485
1402
  STRESS_MARKER;
1403
+ /**
1404
+ * @category Syllabification
1405
+ *
1406
+ * @remarks
1407
+ * See implementation for more details
1408
+ */
486
1409
  allowNoNiqqud;
1410
+ /**
1411
+ * @category Syllabification
1412
+ *
1413
+ * @remarks
1414
+ * See implementation for more details
1415
+ */
487
1416
  article;
1417
+ /**
1418
+ * @category Syllabification
1419
+ *
1420
+ * @remarks
1421
+ * See implementation for more details
1422
+ */
488
1423
  holemHaser;
1424
+ /**
1425
+ * @category Syllabification
1426
+ *
1427
+ * @remarks
1428
+ * See implementation for more details
1429
+ *
1430
+ */
1431
+ ketivQeres;
1432
+ /**
1433
+ * @category Syllabification
1434
+ *
1435
+ * @remarks
1436
+ * See implementation for more details
1437
+ */
489
1438
  longVowels;
1439
+ /**
1440
+ * @category Syllabification
1441
+ *
1442
+ * @remarks
1443
+ * See implementation for more details
1444
+ */
490
1445
  qametsQatan;
1446
+ /**
1447
+ * @category Syllabification
1448
+ *
1449
+ * @remarks
1450
+ * See implementation for more details
1451
+ */
491
1452
  shevaAfterMeteg;
1453
+ /**
1454
+ * @category Syllabification
1455
+ *
1456
+ * @remarks
1457
+ * See implementation for more details
1458
+ */
492
1459
  shevaWithMeteg;
1460
+ /**
1461
+ * @category Syllabification
1462
+ *
1463
+ * @remarks
1464
+ * See implementation for more details
1465
+ */
493
1466
  sqnmlvy;
1467
+ /**
1468
+ * @category Syllabification
1469
+ *
1470
+ * @remarks
1471
+ * See implementation for more details
1472
+ */
494
1473
  strict;
1474
+ /**
1475
+ * @category Syllabification
1476
+ *
1477
+ * @remarks
1478
+ * See implementation for more details
1479
+ */
495
1480
  wawShureq;
1481
+ /**@category Constructors */
496
1482
  constructor(schema) {
497
- (this.VOCAL_SHEVA = schema.VOCAL_SHEVA),
498
- (this.HATAF_SEGOL = schema.HATAF_SEGOL),
499
- (this.HATAF_PATAH = schema.HATAF_PATAH),
500
- (this.HATAF_QAMATS = schema.HATAF_QAMATS),
501
- (this.HIRIQ = schema.HIRIQ),
502
- (this.TSERE = schema.TSERE),
503
- (this.SEGOL = schema.SEGOL),
504
- (this.PATAH = schema.PATAH),
505
- (this.QAMATS = schema.QAMATS),
506
- (this.HOLAM = schema.HOLAM),
507
- (this.HOLAM_HASER = schema.HOLAM_HASER),
508
- (this.QUBUTS = schema.QUBUTS),
509
- (this.DAGESH = schema.DAGESH),
510
- (this.DAGESH_CHAZAQ = schema.DAGESH_CHAZAQ),
511
- (this.MAQAF = schema.MAQAF),
512
- (this.PASEQ = schema.PASEQ),
513
- (this.SOF_PASUQ = schema.SOF_PASUQ),
514
- (this.QAMATS_QATAN = schema.QAMATS_QATAN),
515
- (this.FURTIVE_PATAH = schema.FURTIVE_PATAH),
516
- (this.HIRIQ_YOD = schema.HIRIQ_YOD),
517
- (this.TSERE_YOD = schema.TSERE_YOD),
518
- (this.SEGOL_YOD = schema.SEGOL_YOD),
519
- (this.SHUREQ = schema.SHUREQ),
520
- (this.HOLAM_VAV = schema.HOLAM_VAV),
521
- (this.QAMATS_HE = schema.QAMATS_HE),
522
- (this.SEGOL_HE = schema.SEGOL_HE),
523
- (this.TSERE_HE = schema.TSERE_HE),
524
- (this.MS_SUFX = schema.MS_SUFX),
525
- (this.ALEF = schema.ALEF),
526
- (this.BET_DAGESH = schema.BET_DAGESH),
527
- (this.BET = schema.BET),
528
- (this.GIMEL = schema.GIMEL),
529
- (this.GIMEL_DAGESH = schema.GIMEL_DAGESH),
530
- (this.DALET = schema.DALET),
531
- (this.DALET_DAGESH = schema.DALET_DAGESH),
532
- (this.HE = schema.HE),
533
- (this.VAV = schema.VAV),
534
- (this.ZAYIN = schema.ZAYIN),
535
- (this.HET = schema.HET),
536
- (this.TET = schema.TET),
537
- (this.YOD = schema.YOD),
538
- (this.FINAL_KAF = schema.FINAL_KAF),
539
- (this.KAF = schema.KAF),
540
- (this.KAF_DAGESH = schema.KAF_DAGESH),
541
- (this.LAMED = schema.LAMED),
542
- (this.FINAL_MEM = schema.FINAL_MEM),
543
- (this.MEM = schema.MEM),
544
- (this.FINAL_NUN = schema.FINAL_NUN),
545
- (this.NUN = schema.NUN),
546
- (this.SAMEKH = schema.SAMEKH),
547
- (this.AYIN = schema.AYIN),
548
- (this.FINAL_PE = schema.FINAL_PE),
549
- (this.PE = schema.PE),
550
- (this.PE_DAGESH = schema.PE_DAGESH),
551
- (this.FINAL_TSADI = schema.FINAL_TSADI),
552
- (this.TSADI = schema.TSADI),
553
- (this.QOF = schema.QOF),
554
- (this.RESH = schema.RESH),
555
- (this.SHIN = schema.SHIN),
556
- (this.SIN = schema.SIN),
557
- (this.TAV = schema.TAV),
558
- (this.TAV_DAGESH = schema.TAV_DAGESH),
559
- (this.DIVINE_NAME = schema.DIVINE_NAME),
560
- (this.DIVINE_NAME_ELOHIM = schema.DIVINE_NAME_ELOHIM),
561
- (this.SYLLABLE_SEPARATOR = schema.SYLLABLE_SEPARATOR),
562
- (this.ADDITIONAL_FEATURES = schema.ADDITIONAL_FEATURES),
563
- (this.STRESS_MARKER = schema.STRESS_MARKER),
564
- (this.longVowels = schema.longVowels),
565
- (this.qametsQatan = schema.qametsQatan),
566
- (this.sqnmlvy = schema.sqnmlvy),
567
- (this.shevaAfterMeteg = schema.shevaAfterMeteg),
568
- (this.shevaWithMeteg = schema.shevaWithMeteg),
569
- (this.wawShureq = schema.wawShureq),
570
- (this.article = schema.article),
571
- (this.allowNoNiqqud = schema.allowNoNiqqud),
572
- (this.strict = schema.strict),
573
- (this.holemHaser = schema.holemHaser);
1483
+ this.VOCAL_SHEVA = schema.VOCAL_SHEVA;
1484
+ this.HATAF_SEGOL = schema.HATAF_SEGOL;
1485
+ this.HATAF_PATAH = schema.HATAF_PATAH;
1486
+ this.HATAF_QAMATS = schema.HATAF_QAMATS;
1487
+ this.HIRIQ = schema.HIRIQ;
1488
+ this.TSERE = schema.TSERE;
1489
+ this.SEGOL = schema.SEGOL;
1490
+ this.PATAH = schema.PATAH;
1491
+ this.QAMATS = schema.QAMATS;
1492
+ this.HOLAM = schema.HOLAM;
1493
+ this.HOLAM_HASER = schema.HOLAM_HASER;
1494
+ this.QUBUTS = schema.QUBUTS;
1495
+ this.DAGESH = schema.DAGESH;
1496
+ this.DAGESH_CHAZAQ = schema.DAGESH_CHAZAQ;
1497
+ this.MAQAF = schema.MAQAF;
1498
+ this.PASEQ = schema.PASEQ;
1499
+ this.SOF_PASUQ = schema.SOF_PASUQ;
1500
+ this.QAMATS_QATAN = schema.QAMATS_QATAN;
1501
+ this.FURTIVE_PATAH = schema.FURTIVE_PATAH;
1502
+ this.HIRIQ_YOD = schema.HIRIQ_YOD;
1503
+ this.TSERE_YOD = schema.TSERE_YOD;
1504
+ this.SEGOL_YOD = schema.SEGOL_YOD;
1505
+ this.SHUREQ = schema.SHUREQ;
1506
+ this.HOLAM_VAV = schema.HOLAM_VAV;
1507
+ this.QAMATS_HE = schema.QAMATS_HE;
1508
+ this.SEGOL_HE = schema.SEGOL_HE;
1509
+ this.TSERE_HE = schema.TSERE_HE;
1510
+ this.MS_SUFX = schema.MS_SUFX;
1511
+ this.ALEF = schema.ALEF;
1512
+ this.BET_DAGESH = schema.BET_DAGESH;
1513
+ this.BET = schema.BET;
1514
+ this.GIMEL = schema.GIMEL;
1515
+ this.GIMEL_DAGESH = schema.GIMEL_DAGESH;
1516
+ this.DALET = schema.DALET;
1517
+ this.DALET_DAGESH = schema.DALET_DAGESH;
1518
+ this.HE = schema.HE;
1519
+ this.VAV = schema.VAV;
1520
+ this.ZAYIN = schema.ZAYIN;
1521
+ this.HET = schema.HET;
1522
+ this.TET = schema.TET;
1523
+ this.YOD = schema.YOD;
1524
+ this.FINAL_KAF = schema.FINAL_KAF;
1525
+ this.KAF = schema.KAF;
1526
+ this.KAF_DAGESH = schema.KAF_DAGESH;
1527
+ this.LAMED = schema.LAMED;
1528
+ this.FINAL_MEM = schema.FINAL_MEM;
1529
+ this.MEM = schema.MEM;
1530
+ this.FINAL_NUN = schema.FINAL_NUN;
1531
+ this.NUN = schema.NUN;
1532
+ this.SAMEKH = schema.SAMEKH;
1533
+ this.AYIN = schema.AYIN;
1534
+ this.FINAL_PE = schema.FINAL_PE;
1535
+ this.PE = schema.PE;
1536
+ this.PE_DAGESH = schema.PE_DAGESH;
1537
+ this.FINAL_TSADI = schema.FINAL_TSADI;
1538
+ this.TSADI = schema.TSADI;
1539
+ this.QOF = schema.QOF;
1540
+ this.RESH = schema.RESH;
1541
+ this.SHIN = schema.SHIN;
1542
+ this.SIN = schema.SIN;
1543
+ this.TAV = schema.TAV;
1544
+ this.TAV_DAGESH = schema.TAV_DAGESH;
1545
+ this.DIVINE_NAME = schema.DIVINE_NAME;
1546
+ this.DIVINE_NAME_ELOHIM = schema.DIVINE_NAME_ELOHIM;
1547
+ this.SYLLABLE_SEPARATOR = schema.SYLLABLE_SEPARATOR;
1548
+ this.ADDITIONAL_FEATURES = schema.ADDITIONAL_FEATURES;
1549
+ this.STRESS_MARKER = schema.STRESS_MARKER;
1550
+ this.longVowels = schema.longVowels;
1551
+ this.qametsQatan = schema.qametsQatan;
1552
+ this.sqnmlvy = schema.sqnmlvy;
1553
+ this.shevaAfterMeteg = schema.shevaAfterMeteg;
1554
+ this.shevaWithMeteg = schema.shevaWithMeteg;
1555
+ this.wawShureq = schema.wawShureq;
1556
+ this.article = schema.article;
1557
+ this.allowNoNiqqud = schema.allowNoNiqqud;
1558
+ this.strict = schema.strict;
1559
+ this.holemHaser = schema.holemHaser;
1560
+ this.ketivQeres = schema.ketivQeres;
574
1561
  }
575
1562
  }
1563
+ /**
1564
+ * The default schema according to SBL's academic style guide.
1565
+ *
1566
+ * Whereas a new {@link Schema} must have all required properties when constructed,
1567
+ * this schema is meant to be used as a default so particular properties can be overidden (see example).
1568
+ *
1569
+ * If the property is not set, the default value will be used. Each property is documented below with their default values.
1570
+ *
1571
+ * Click into each property's "Overrides" for more information about that property.
1572
+ *
1573
+ * @param schema a {@link Schema | Partial\<Schema\>}
1574
+ *
1575
+ * @example
1576
+ * Extend the default schema
1577
+ * ```js
1578
+ * transliterate("שָׁלוֹם", { SHIN: "sh" });
1579
+ * // shālôm
1580
+ * ```
1581
+ *
1582
+ * @privateRemarks
1583
+ * In order for documentation output to be the way I wanted, the properties are all redefined with their type from the Schema.
1584
+ * This is not necessary for the implementation, just the docs.
1585
+ */
576
1586
  export class SBL extends Schema {
577
1587
  constructor(schema) {
578
1588
  super({
@@ -652,8 +1662,87 @@ export class SBL extends Schema {
652
1662
  article: schema.article ?? true,
653
1663
  allowNoNiqqud: schema.allowNoNiqqud ?? true,
654
1664
  strict: schema.strict ?? false,
655
- holemHaser: schema.holemHaser || "remove"
1665
+ holemHaser: schema.holemHaser || "remove",
1666
+ ketivQeres: schema.ketivQeres || undefined
656
1667
  });
1668
+ this.VOCAL_SHEVA = schema.VOCAL_SHEVA ?? "ǝ";
1669
+ this.HATAF_SEGOL = schema.HATAF_SEGOL ?? "ĕ";
1670
+ this.HATAF_PATAH = schema.HATAF_PATAH ?? "ă";
1671
+ this.HATAF_QAMATS = schema.HATAF_QAMATS ?? "ŏ";
1672
+ this.HIRIQ = schema.HIRIQ ?? "i";
1673
+ this.TSERE = schema.TSERE ?? "ē";
1674
+ this.SEGOL = schema.SEGOL ?? "e";
1675
+ this.PATAH = schema.PATAH ?? "a";
1676
+ this.QAMATS = schema.QAMATS ?? "ā";
1677
+ this.HOLAM = schema.HOLAM ?? "ō";
1678
+ this.HOLAM_HASER = schema.HOLAM_HASER ?? "ō";
1679
+ this.QUBUTS = schema.QUBUTS ?? "ū";
1680
+ this.DAGESH = schema.DAGESH ?? "";
1681
+ this.DAGESH_CHAZAQ = schema.DAGESH_CHAZAQ ?? true;
1682
+ this.MAQAF = schema.MAQAF ?? "-";
1683
+ this.PASEQ = schema.PASEQ ?? "";
1684
+ this.SOF_PASUQ = schema.SOF_PASUQ ?? "";
1685
+ this.QAMATS_QATAN = schema.QAMATS_QATAN ?? "o";
1686
+ this.FURTIVE_PATAH = schema.FURTIVE_PATAH ?? "a";
1687
+ this.HIRIQ_YOD = schema.HIRIQ_YOD ?? "î";
1688
+ this.TSERE_YOD = schema.TSERE_YOD ?? "ê";
1689
+ this.SEGOL_YOD = schema.SEGOL_YOD ?? "ê";
1690
+ this.SHUREQ = schema.SHUREQ ?? "û";
1691
+ this.HOLAM_VAV = schema.HOLAM_VAV ?? "ô";
1692
+ this.QAMATS_HE = schema.QAMATS_HE ?? "â";
1693
+ this.SEGOL_HE = schema.SEGOL_HE ?? "ê";
1694
+ this.TSERE_HE = schema.TSERE_HE ?? "ê";
1695
+ this.MS_SUFX = schema.MS_SUFX ?? "āyw";
1696
+ this.ALEF = schema.ALEF ?? "ʾ";
1697
+ this.BET = schema.BET ?? "b";
1698
+ this.BET_DAGESH = schema.BET_DAGESH ?? undefined;
1699
+ this.GIMEL = schema.GIMEL ?? "g";
1700
+ this.GIMEL_DAGESH = schema.GIMEL_DAGESH ?? undefined;
1701
+ this.DALET = schema.DALET ?? "d";
1702
+ this.DALET_DAGESH = schema.DALET_DAGESH ?? undefined;
1703
+ this.HE = schema.HE ?? "h";
1704
+ this.VAV = schema.VAV ?? "w";
1705
+ this.ZAYIN = schema.ZAYIN ?? "z";
1706
+ this.HET = schema.HET ?? "ḥ";
1707
+ this.TET = schema.TET ?? "ṭ";
1708
+ this.YOD = schema.YOD ?? "y";
1709
+ this.FINAL_KAF = schema.FINAL_KAF ?? "k";
1710
+ this.KAF = schema.KAF ?? "k";
1711
+ this.KAF_DAGESH = schema.KAF_DAGESH ?? undefined;
1712
+ this.LAMED = schema.LAMED ?? "l";
1713
+ this.FINAL_MEM = schema.FINAL_MEM ?? "m";
1714
+ this.MEM = schema.MEM ?? "m";
1715
+ this.FINAL_NUN = schema.FINAL_NUN ?? "n";
1716
+ this.NUN = schema.NUN ?? "n";
1717
+ this.SAMEKH = schema.SAMEKH ?? "s";
1718
+ this.AYIN = schema.AYIN ?? "ʿ";
1719
+ this.FINAL_PE = schema.FINAL_PE ?? "p";
1720
+ this.PE = schema.PE ?? "p";
1721
+ this.PE_DAGESH = schema.PE_DAGESH ?? undefined;
1722
+ this.FINAL_TSADI = schema.FINAL_TSADI ?? "ṣ";
1723
+ this.TSADI = schema.TSADI ?? "ṣ";
1724
+ this.QOF = schema.QOF ?? "q";
1725
+ this.RESH = schema.RESH ?? "r";
1726
+ this.SHIN = schema.SHIN ?? "š";
1727
+ this.SIN = schema.SIN ?? "ś";
1728
+ this.TAV = schema.TAV ?? "t";
1729
+ this.TAV_DAGESH = schema.TAV_DAGESH ?? undefined;
1730
+ this.DIVINE_NAME = schema.DIVINE_NAME ?? "yhwh";
1731
+ this.DIVINE_NAME_ELOHIM = schema.DIVINE_NAME_ELOHIM ?? undefined;
1732
+ this.SYLLABLE_SEPARATOR = schema.SYLLABLE_SEPARATOR ?? undefined;
1733
+ this.ADDITIONAL_FEATURES = schema.ADDITIONAL_FEATURES ?? undefined;
1734
+ this.STRESS_MARKER = schema.STRESS_MARKER ?? undefined;
1735
+ this.longVowels = schema.longVowels ?? true;
1736
+ this.qametsQatan = schema.qametsQatan ?? true;
1737
+ this.shevaAfterMeteg = schema.shevaAfterMeteg ?? true;
1738
+ this.shevaWithMeteg = schema.shevaWithMeteg ?? false;
1739
+ this.sqnmlvy = schema.sqnmlvy ?? true;
1740
+ this.wawShureq = schema.wawShureq ?? true;
1741
+ this.article = schema.article ?? true;
1742
+ this.allowNoNiqqud = schema.allowNoNiqqud ?? true;
1743
+ this.strict = schema.strict ?? false;
1744
+ this.holemHaser = schema.holemHaser ?? "remove";
1745
+ this.ketivQeres = schema.ketivQeres ?? undefined;
657
1746
  }
658
1747
  }
659
1748
  //# sourceMappingURL=schema.js.map