hebrew-transliteration 2.2.2 → 2.2.4
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/README.md +5 -10
- package/dist/.DS_Store +0 -0
- package/dist/rules.d.ts +2 -2
- package/dist/rules.js +1 -1
- package/dist/schema.d.ts +7 -1
- package/dist/schema.js +6 -4
- package/dist/schemas/brillAcademic.js +2 -1
- package/dist/schemas/brillSimple.js +2 -1
- package/dist/schemas/index.d.ts +2 -1
- package/dist/schemas/index.js +3 -1
- package/dist/schemas/michiganClaremont.js +2 -1
- package/dist/schemas/romaniote.d.ts +2 -0
- package/dist/schemas/romaniote.js +96 -0
- package/dist/schemas/sblAcademicSpirantization.js +2 -1
- package/dist/schemas/sblSimple.js +2 -1
- package/dist/transliterate.js +3 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ It exports 3 [functions](#functions):
|
|
|
45
45
|
|
|
46
46
|
And it exports 2 [classes](#classes):
|
|
47
47
|
|
|
48
|
-
1. [`Text`](#text) — the [`Text`](https://charlesloder.github.io/
|
|
48
|
+
1. [`Text`](#text) — the [`Text`](https://charlesloder.github.io/havarotjs/classes/text.Text.html) class from the `havarotjs` package
|
|
49
49
|
2. [`Schema`](#schema) — a schema for transliterating Hebrew
|
|
50
50
|
|
|
51
51
|
### Functions
|
|
@@ -132,7 +132,7 @@ heb.sequence("\u{5D1}\u{5B0}\u{5BC}\u{5E8}\u{5B5}\u{5D0}\u{5E9}\u{5B4}\u{5C1}\u{
|
|
|
132
132
|
|
|
133
133
|
#### Text
|
|
134
134
|
|
|
135
|
-
The [`Text`](https://charlesloder.github.io/
|
|
135
|
+
The [`Text`](https://charlesloder.github.io/havarotjs/classes/text.Text.html) class from the [`havarotjs`](https://www.npmjs.com/package/havarotjs) package.
|
|
136
136
|
|
|
137
137
|
This class is used by [`transliterate()`](#transliterate) internally to syllabify Hebrew text, but it is exposed as well.
|
|
138
138
|
|
|
@@ -158,18 +158,13 @@ The `Schema` can be divided into a few categories.
|
|
|
158
158
|
|
|
159
159
|
##### 1) Syllabification
|
|
160
160
|
|
|
161
|
-
The options used for syllabifying Hebrew text can be found [here](https://charlesloder.github.io/
|
|
161
|
+
The options used for syllabifying Hebrew text can be found [here](https://charlesloder.github.io/havarotjs/interfaces/text.SylOpts.html)
|
|
162
162
|
|
|
163
163
|
###### Differences between `Text` and `Schema`
|
|
164
164
|
|
|
165
|
-
There are 5 options for syllabification that are the [same as the ones used by the `Text`](https://charlesloder.github.io/
|
|
165
|
+
There are 5 options for syllabification that are the [same as the ones used by the `Text`](https://charlesloder.github.io/havarotjs/interfaces/text.SylOpts.html) class.
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
const text = new heb.Text("חׇכְמָ֣ה", { schema: "traditional" }); // this is okay
|
|
169
|
-
const schema = new heb.Schema({ schema: "traditional" }); // this does nothing
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
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)
|
|
167
|
+
Read more about the syllabification options for the [`Text`](https://charlesloder.github.io/havarotjs/interfaces/text.SylOpts.html) and a [higher level overview](https://charlesloder.github.io/havarotjs/pages/Linguistic/syllabification.html)
|
|
173
168
|
|
|
174
169
|
###### Precedence of `Text` over `Schema`
|
|
175
170
|
|
package/dist/.DS_Store
ADDED
|
Binary file
|
package/dist/rules.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Syllable } from "havarotjs/
|
|
2
|
-
import { Word } from "havarotjs/
|
|
1
|
+
import { Syllable } from "havarotjs/syllable";
|
|
2
|
+
import { Word } from "havarotjs/word";
|
|
3
3
|
import { Schema } from "./schema";
|
|
4
4
|
export declare const sylRules: (syl: Syllable, schema: Schema) => string;
|
|
5
5
|
export declare const wordRules: (word: Word, schema: Schema) => string | Word;
|
package/dist/rules.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.wordRules = exports.sylRules = void 0;
|
|
4
|
-
const cluster_1 = require("havarotjs/
|
|
4
|
+
const cluster_1 = require("havarotjs/cluster");
|
|
5
5
|
const regularExpressions_1 = require("havarotjs/dist/utils/regularExpressions");
|
|
6
6
|
const mapChars_1 = require("./mapChars");
|
|
7
7
|
const taamim = /[\u{0590}-\u{05AF}\u{05BD}\u{05BF}]/u;
|
package/dist/schema.d.ts
CHANGED
|
@@ -425,7 +425,12 @@ export declare class Schema implements SylOpts {
|
|
|
425
425
|
* - `"word"` covers everything else
|
|
426
426
|
*/
|
|
427
427
|
FEATURE: "word" | "syllable" | "cluster";
|
|
428
|
-
/**
|
|
428
|
+
/**
|
|
429
|
+
* The Hebrew text — use consonants and vowels; do not use taamim
|
|
430
|
+
*
|
|
431
|
+
* The text is parsed as a Regex so special characters like `?` and `|` can be used
|
|
432
|
+
*
|
|
433
|
+
*/
|
|
429
434
|
HEBREW: string;
|
|
430
435
|
TRANSLITERATION: string;
|
|
431
436
|
}[];
|
|
@@ -469,6 +474,7 @@ export declare class Schema implements SylOpts {
|
|
|
469
474
|
wawShureq: SylOpts["wawShureq"];
|
|
470
475
|
article: SylOpts["article"];
|
|
471
476
|
allowNoNiqqud: SylOpts["allowNoNiqqud"];
|
|
477
|
+
strict: SylOpts["strict"];
|
|
472
478
|
constructor(schema: Schema);
|
|
473
479
|
}
|
|
474
480
|
export declare class SBL extends Schema {
|
package/dist/schema.js
CHANGED
|
@@ -75,14 +75,15 @@ class Schema {
|
|
|
75
75
|
(this.qametsQatan = schema.qametsQatan),
|
|
76
76
|
(this.sqnmlvy = schema.sqnmlvy),
|
|
77
77
|
(this.wawShureq = schema.wawShureq),
|
|
78
|
-
(this.article = schema.article)
|
|
79
|
-
|
|
78
|
+
(this.article = schema.article),
|
|
79
|
+
(this.allowNoNiqqud = schema.allowNoNiqqud),
|
|
80
|
+
(this.strict = schema.strict);
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
exports.Schema = Schema;
|
|
83
84
|
class SBL extends Schema {
|
|
84
85
|
constructor(schema) {
|
|
85
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46;
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _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;
|
|
86
87
|
super({
|
|
87
88
|
VOCAL_SHEVA: (_a = schema.VOCAL_SHEVA) !== null && _a !== void 0 ? _a : "ǝ",
|
|
88
89
|
HATAF_SEGOL: (_b = schema.HATAF_SEGOL) !== null && _b !== void 0 ? _b : "ĕ",
|
|
@@ -154,7 +155,8 @@ class SBL extends Schema {
|
|
|
154
155
|
sqnmlvy: (_43 = schema.sqnmlvy) !== null && _43 !== void 0 ? _43 : true,
|
|
155
156
|
wawShureq: (_44 = schema.wawShureq) !== null && _44 !== void 0 ? _44 : true,
|
|
156
157
|
article: (_45 = schema.article) !== null && _45 !== void 0 ? _45 : true,
|
|
157
|
-
allowNoNiqqud: (_46 = schema.allowNoNiqqud) !== null && _46 !== void 0 ? _46 : true
|
|
158
|
+
allowNoNiqqud: (_46 = schema.allowNoNiqqud) !== null && _46 !== void 0 ? _46 : true,
|
|
159
|
+
strict: (_47 = schema.strict) !== null && _47 !== void 0 ? _47 : false
|
|
158
160
|
});
|
|
159
161
|
}
|
|
160
162
|
}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ import { brillAcademic } from "./brillAcademic";
|
|
|
2
2
|
import { brillSimple } from "./brillSimple";
|
|
3
3
|
import { sblAcademicSpirantization } from "./sblAcademicSpirantization";
|
|
4
4
|
import { sblSimple } from "./sblSimple";
|
|
5
|
-
|
|
5
|
+
import { michiganClaremont } from "./michiganClaremont";
|
|
6
|
+
export { brillAcademic, brillSimple, sblAcademicSpirantization, sblSimple, michiganClaremont };
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sblSimple = exports.sblAcademicSpirantization = exports.brillSimple = exports.brillAcademic = void 0;
|
|
3
|
+
exports.michiganClaremont = exports.sblSimple = exports.sblAcademicSpirantization = exports.brillSimple = exports.brillAcademic = void 0;
|
|
4
4
|
const brillAcademic_1 = require("./brillAcademic");
|
|
5
5
|
Object.defineProperty(exports, "brillAcademic", { enumerable: true, get: function () { return brillAcademic_1.brillAcademic; } });
|
|
6
6
|
const brillSimple_1 = require("./brillSimple");
|
|
@@ -9,3 +9,5 @@ const sblAcademicSpirantization_1 = require("./sblAcademicSpirantization");
|
|
|
9
9
|
Object.defineProperty(exports, "sblAcademicSpirantization", { enumerable: true, get: function () { return sblAcademicSpirantization_1.sblAcademicSpirantization; } });
|
|
10
10
|
const sblSimple_1 = require("./sblSimple");
|
|
11
11
|
Object.defineProperty(exports, "sblSimple", { enumerable: true, get: function () { return sblSimple_1.sblSimple; } });
|
|
12
|
+
const michiganClaremont_1 = require("./michiganClaremont");
|
|
13
|
+
Object.defineProperty(exports, "michiganClaremont", { enumerable: true, get: function () { return michiganClaremont_1.michiganClaremont; } });
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.romaniote = void 0;
|
|
4
|
+
exports.romaniote = {
|
|
5
|
+
ALEF: "",
|
|
6
|
+
BET: "β",
|
|
7
|
+
BET_DAGESH: "μπ",
|
|
8
|
+
GIMEL: "γ",
|
|
9
|
+
GIMEL_DAGESH: "γκ",
|
|
10
|
+
DALET: "δ",
|
|
11
|
+
DALET_DAGESH: "ντ",
|
|
12
|
+
HE: "",
|
|
13
|
+
VAV: "β",
|
|
14
|
+
ZAYIN: "ζ",
|
|
15
|
+
HET: "χ",
|
|
16
|
+
TET: "τ",
|
|
17
|
+
YOD: "γι",
|
|
18
|
+
KAF: "χ",
|
|
19
|
+
KAF_DAGESH: "κ",
|
|
20
|
+
FINAL_KAF: "χ",
|
|
21
|
+
LAMED: "λ",
|
|
22
|
+
MEM: "μ",
|
|
23
|
+
FINAL_MEM: "μ",
|
|
24
|
+
NUN: "ν",
|
|
25
|
+
FINAL_NUN: "ν",
|
|
26
|
+
SAMEKH: "σ",
|
|
27
|
+
AYIN: "",
|
|
28
|
+
PE: "φ",
|
|
29
|
+
PE_DAGESH: "π",
|
|
30
|
+
FINAL_PE: "φ",
|
|
31
|
+
TSADI: "τσ",
|
|
32
|
+
FINAL_TSADI: "τσ",
|
|
33
|
+
QOF: "κ",
|
|
34
|
+
RESH: "ρ",
|
|
35
|
+
SIN: "σ",
|
|
36
|
+
SHIN: "σσ",
|
|
37
|
+
TAV: "θ",
|
|
38
|
+
TAV_DAGESH: "τ",
|
|
39
|
+
DAGESH: "",
|
|
40
|
+
DAGESH_CHAZAQ: true,
|
|
41
|
+
VOCAL_SHEVA: "ε",
|
|
42
|
+
PATAH: "α",
|
|
43
|
+
HATAF_PATAH: "α",
|
|
44
|
+
QAMATS: "α",
|
|
45
|
+
HATAF_QAMATS: "ο",
|
|
46
|
+
SEGOL: "ε",
|
|
47
|
+
HATAF_SEGOL: "ε",
|
|
48
|
+
TSERE: "ε",
|
|
49
|
+
HIRIQ: "ι",
|
|
50
|
+
HOLAM: "ω",
|
|
51
|
+
QUBUTS: "ου",
|
|
52
|
+
QAMATS_HE: "α",
|
|
53
|
+
SEGOL_HE: "ε",
|
|
54
|
+
TSERE_HE: "ε",
|
|
55
|
+
SEGOL_YOD: "ε",
|
|
56
|
+
HIRIQ_YOD: "η",
|
|
57
|
+
TSERE_YOD: "ε",
|
|
58
|
+
FURTIVE_PATAH: "a",
|
|
59
|
+
QAMATS_QATAN: "o",
|
|
60
|
+
HOLAM_VAV: "o",
|
|
61
|
+
SHUREQ: "ου",
|
|
62
|
+
MS_SUFX: "άβ",
|
|
63
|
+
PASEQ: "",
|
|
64
|
+
SOF_PASUQ: "",
|
|
65
|
+
MAQAF: "-",
|
|
66
|
+
DIVINE_NAME: "Αδωνάη",
|
|
67
|
+
ADDITIONAL_FEATURES: [
|
|
68
|
+
{
|
|
69
|
+
FEATURE: "cluster",
|
|
70
|
+
HEBREW: "זּ",
|
|
71
|
+
TRANSLITERATION: "τζ"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
FEATURE: "syllable",
|
|
75
|
+
HEBREW: "ִים",
|
|
76
|
+
TRANSLITERATION: "είμ"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
FEATURE: "syllable",
|
|
80
|
+
HEBREW: "\u{05B5}\u{05D9}$",
|
|
81
|
+
TRANSLITERATION: "αί"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
FEATURE: "syllable",
|
|
85
|
+
HEBREW: "\u{05B5}\u{05D9}[\u{05BE}|-]?$",
|
|
86
|
+
TRANSLITERATION: "αί-"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
longVowels: true,
|
|
90
|
+
sqnmlvy: true,
|
|
91
|
+
qametsQatan: true,
|
|
92
|
+
wawShureq: true,
|
|
93
|
+
article: true,
|
|
94
|
+
allowNoNiqqud: true,
|
|
95
|
+
strict: false
|
|
96
|
+
};
|
package/dist/transliterate.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.transliterate = void 0;
|
|
|
4
4
|
const rules_1 = require("./rules");
|
|
5
5
|
const schema_1 = require("./schema");
|
|
6
6
|
const havarotjs_1 = require("havarotjs");
|
|
7
|
-
const word_1 = require("havarotjs/
|
|
7
|
+
const word_1 = require("havarotjs/word");
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* @param schema
|
|
@@ -25,6 +25,8 @@ const getSylOpts = (schema) => {
|
|
|
25
25
|
options.article = schema.article;
|
|
26
26
|
if ("allowNoNiqqud" in schema)
|
|
27
27
|
options.allowNoNiqqud = schema.allowNoNiqqud;
|
|
28
|
+
if ("strict" in schema)
|
|
29
|
+
options.strict = schema.strict;
|
|
28
30
|
return options;
|
|
29
31
|
};
|
|
30
32
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hebrew-transliteration",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "a package for transliterating Hebrew",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"author": "Charles Loder",
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@types/jest": "^29.
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
61
|
-
"esbuild": "^0.15.
|
|
62
|
-
"eslint": "^8.
|
|
59
|
+
"@types/jest": "^29.2.2",
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
|
61
|
+
"esbuild": "^0.15.13",
|
|
62
|
+
"eslint": "^8.27.0",
|
|
63
63
|
"eslint-config-prettier": "^8.5.0",
|
|
64
|
-
"eslint-plugin-jest": "^27.
|
|
65
|
-
"eslint-plugin-jsdoc": "^39.
|
|
64
|
+
"eslint-plugin-jest": "^27.1.4",
|
|
65
|
+
"eslint-plugin-jsdoc": "^39.6.2",
|
|
66
66
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
67
|
-
"jest": "^29.1
|
|
68
|
-
"npm-check-updates": "^16.3.
|
|
67
|
+
"jest": "^29.3.1",
|
|
68
|
+
"npm-check-updates": "^16.3.18",
|
|
69
69
|
"npm-dts": "^1.3.12",
|
|
70
70
|
"prettier": "^2.7.1",
|
|
71
71
|
"ts-jest": "^29.0.3",
|
|
72
72
|
"typescript": "^4.8.4"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"havarotjs": "^0.
|
|
75
|
+
"havarotjs": "^0.11.2"
|
|
76
76
|
}
|
|
77
77
|
}
|