codexparser 0.3.1 → 0.4.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.
@@ -81,7 +81,7 @@ module.exports = {
81
81
  },
82
82
  "23:29": {
83
83
  lxx: "24:1",
84
- mt: "23:29",
84
+ mt: "24:1",
85
85
  eng: "23:29",
86
86
  },
87
87
  "24:1": {
@@ -0,0 +1,117 @@
1
+ // Versification mappings for 2 Kings.
2
+ // ESV/ENG and MT/LXX differ in chapter 11/12: the verse "And Jehoash was seven
3
+ // years old when he began to reign" is numbered 11:21 in ENG but 12:1 in MT
4
+ // and LXX (4 Kingdoms in LXX). Subsequent verses 12:1-21 ENG = 12:2-22 MT/LXX.
5
+ // LXX = MT throughout this book.
6
+ module.exports = {
7
+ "11:21": {
8
+ lxx: "12:1",
9
+ mt: "12:1",
10
+ eng: "11:21",
11
+ },
12
+ "12:1": {
13
+ lxx: "12:2",
14
+ mt: "12:2",
15
+ eng: "12:1",
16
+ },
17
+ "12:2": {
18
+ lxx: "12:3",
19
+ mt: "12:3",
20
+ eng: "12:2",
21
+ },
22
+ "12:3": {
23
+ lxx: "12:4",
24
+ mt: "12:4",
25
+ eng: "12:3",
26
+ },
27
+ "12:4": {
28
+ lxx: "12:5",
29
+ mt: "12:5",
30
+ eng: "12:4",
31
+ },
32
+ "12:5": {
33
+ lxx: "12:6",
34
+ mt: "12:6",
35
+ eng: "12:5",
36
+ },
37
+ "12:6": {
38
+ lxx: "12:7",
39
+ mt: "12:7",
40
+ eng: "12:6",
41
+ },
42
+ "12:7": {
43
+ lxx: "12:8",
44
+ mt: "12:8",
45
+ eng: "12:7",
46
+ },
47
+ "12:8": {
48
+ lxx: "12:9",
49
+ mt: "12:9",
50
+ eng: "12:8",
51
+ },
52
+ "12:9": {
53
+ lxx: "12:10",
54
+ mt: "12:10",
55
+ eng: "12:9",
56
+ },
57
+ "12:10": {
58
+ lxx: "12:11",
59
+ mt: "12:11",
60
+ eng: "12:10",
61
+ },
62
+ "12:11": {
63
+ lxx: "12:12",
64
+ mt: "12:12",
65
+ eng: "12:11",
66
+ },
67
+ "12:12": {
68
+ lxx: "12:13",
69
+ mt: "12:13",
70
+ eng: "12:12",
71
+ },
72
+ "12:13": {
73
+ lxx: "12:14",
74
+ mt: "12:14",
75
+ eng: "12:13",
76
+ },
77
+ "12:14": {
78
+ lxx: "12:15",
79
+ mt: "12:15",
80
+ eng: "12:14",
81
+ },
82
+ "12:15": {
83
+ lxx: "12:16",
84
+ mt: "12:16",
85
+ eng: "12:15",
86
+ },
87
+ "12:16": {
88
+ lxx: "12:17",
89
+ mt: "12:17",
90
+ eng: "12:16",
91
+ },
92
+ "12:17": {
93
+ lxx: "12:18",
94
+ mt: "12:18",
95
+ eng: "12:17",
96
+ },
97
+ "12:18": {
98
+ lxx: "12:19",
99
+ mt: "12:19",
100
+ eng: "12:18",
101
+ },
102
+ "12:19": {
103
+ lxx: "12:20",
104
+ mt: "12:20",
105
+ eng: "12:19",
106
+ },
107
+ "12:20": {
108
+ lxx: "12:21",
109
+ mt: "12:21",
110
+ eng: "12:20",
111
+ },
112
+ "12:21": {
113
+ lxx: "12:22",
114
+ mt: "12:22",
115
+ eng: "12:21",
116
+ },
117
+ }
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  "18:33": {
3
3
  lxx: "19:1",
4
- mt: "18:33",
4
+ mt: "19:1",
5
5
  eng: "18:33",
6
6
  },
7
7
  "19:1": {
@@ -1,3 +1,24 @@
1
+ // LXX-only chapter helper for the Greek additions. Generates a versification
2
+ // entry per verse where the LXX (Theodotion) numbers the verse identically
3
+ // to the Vulgate/deuterocanonical ENG reference. mt is null because the
4
+ // chapter is absent from the Hebrew text.
5
+ //
6
+ // Edition note: Göttingen Ziegler-Munnich (1999) and Rahlfs-Hanhart (2006)
7
+ // both PRINT Susanna and Bel & the Dragon as standalone books titled
8
+ // ΣΟΥΣΑΝΝΑ and ΒΗΛ ΚΑΙ ΔΡΑΚΩΝ rather than as Daniel chapters 13 and 14.
9
+ // The Vulgate / NRSV-with-Apocrypha / NABRE traditions append them as Daniel
10
+ // 13 and 14, which is what we model here so user input like "Daniel 13:1"
11
+ // can be parsed canonically. The verse counts (64 Susanna, 42 Bel) and
12
+ // numbering match Hanhart's printed Theodotion text.
13
+ const lxxOnlyChapter = (chapter, verseCount) => {
14
+ const out = {}
15
+ for (let v = 1; v <= verseCount; v++) {
16
+ const ref = `${chapter}:${v}`
17
+ out[ref] = { lxx: ref, mt: null, eng: ref }
18
+ }
19
+ return out
20
+ }
21
+
1
22
  module.exports = {
2
23
  // Chapter 3: Include all LXX verses, with mt/eng set to null where no correspondence exists
3
24
  "3:1": {
@@ -834,4 +855,11 @@ module.exports = {
834
855
  mt: "6:29",
835
856
  eng: "6:28",
836
857
  },
858
+
859
+ // Daniel 13: Susanna (Theodotion). 64 verses, LXX-only, identical numbering
860
+ // in Rahlfs and Göttingen Ziegler-Munnich (1999).
861
+ ...lxxOnlyChapter(13, 64),
862
+
863
+ // Daniel 14: Bel and the Dragon (Theodotion). 42 verses, LXX-only.
864
+ ...lxxOnlyChapter(14, 42),
837
865
  }
@@ -0,0 +1,114 @@
1
+ // Versification mappings for Esther.
2
+ //
3
+ // Hebrew Esther (1:1-10:3): MT and LXX otherwise share numbering. The one
4
+ // versification difference within the canonical Hebrew portion is the bridge
5
+ // verse: Vulgate/MT 1:1 corresponds to LXX 1:1s in Hanhart's Göttingen Esther
6
+ // (1983) and the revised Rahlfs-Hanhart 2006 hand-edition - the canonical
7
+ // "in the days of Ahasuerus" sentence ends Addition A's interpolated cluster
8
+ // before chapter 1 verse 2 resumes.
9
+ //
10
+ // Greek Esther adds six blocks (Additions A-F) to the LXX text. Keys use the
11
+ // Vulgate / RSV-with-Apocrypha numbering (chapters 10:4-16:24 appended after
12
+ // the Hebrew portion). Letter sequences in the `lxx` field were verified
13
+ // against the Septuaginta SESB edition (Rahlfs-Hanhart 2006, ed. Hanhart) for
14
+ // each addition. Hanhart's letters skip 'j' throughout (not a Greek letter)
15
+ // and additionally skip 'v' in Addition C and 'v','w' in Addition E.
16
+ //
17
+ // Vulgate-to-Hanhart counts:
18
+ // Add A (1:1a-1:1r): 17 letters = 17 Vulgate verses (11:2-12 + 12:1-6) 1:1
19
+ // Bridge (1:1s): 1 letter = canonical Vulgate 1:1
20
+ // Add B (3:13a-13g): 7 letters = 7 Vulgate verses
21
+ // Add C (4:17a-17z): 24 letters < 30 Vulgate verses (13:8-18 + 14:1-19);
22
+ // last 6 verses (14:14-19) collapse to 4:17z
23
+ // Add D (5:1a-1f, 5:2a-2b): 8 letters < 16 Vulgate verses (15:1-16);
24
+ // overflow collapses to 5:2b
25
+ // Add E (8:12a-12u, 12x): 21 letters < 24 Vulgate verses (16:1-24);
26
+ // last 3 verses (16:22-24) collapse to 8:12x
27
+ // Add F (10:3a-3l): 11 letters = 11 Vulgate verses (10:4-13 + 11:1) 1:1
28
+ //
29
+ // Where Hanhart's letter run is shorter than the Vulgate verse count, this
30
+ // file maps the surplus Vulgate verses to the last available letter rather
31
+ // than fabricate letters Hanhart does not print. If the user's edition
32
+ // (Rahlfs vs Göttingen) handles the overflow differently, override the
33
+ // affected entries with `lxxRahlfs`.
34
+
35
+ // Build a verse map from a list of LXX letter-suffixes (in order) and the
36
+ // starting deuterocanonical chapter:verse. Each entry is shaped as the
37
+ // existing versification format: { lxx, mt: null, eng }.
38
+ function mapAddition(engChapter, engStart, lxxAnchorChapter, lxxAnchorVerse, letters, vulgateCount) {
39
+ const out = {}
40
+ for (let i = 0; i < vulgateCount; i++) {
41
+ const eng = `${engChapter}:${engStart + i}`
42
+ // Use letter[i] if available; once we exhaust letters, collapse to the
43
+ // last letter (this only happens in C, D, E where Vulgate > Hanhart).
44
+ const letterIdx = Math.min(i, letters.length - 1)
45
+ const lxx = `${lxxAnchorChapter}:${lxxAnchorVerse}${letters[letterIdx]}`
46
+ out[eng] = { lxx, mt: null, eng }
47
+ }
48
+ return out
49
+ }
50
+
51
+ // Build a verse map for an addition that uses two LXX anchors (e.g., Add D
52
+ // has 5:1a-1f then 5:2a-2b). `segments` is an array of
53
+ // { chapter, verse, letters } entries traversed in order.
54
+ function mapSegmentedAddition(engChapter, engStart, segments, vulgateCount) {
55
+ const out = {}
56
+ const flat = []
57
+ for (const seg of segments) {
58
+ for (const ch of seg.letters) flat.push({ chapter: seg.chapter, verse: seg.verse, letter: ch })
59
+ }
60
+ for (let i = 0; i < vulgateCount; i++) {
61
+ const eng = `${engChapter}:${engStart + i}`
62
+ const idx = Math.min(i, flat.length - 1)
63
+ const slot = flat[idx]
64
+ out[eng] = { lxx: `${slot.chapter}:${slot.verse}${slot.letter}`, mt: null, eng }
65
+ }
66
+ return out
67
+ }
68
+
69
+ // Letter sequences (verified against Hanhart 2006 in Logos LLS:LXXSESB).
70
+ const ADD_A_LETTERS = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "k", "l", "m", "n", "o", "p", "q", "r"] // 17, skip j
71
+ const ADD_B_LETTERS = ["a", "b", "c", "d", "e", "f", "g"] // 7
72
+ const ADD_C_LETTERS = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "w", "x", "y", "z"] // 24, skip j+v
73
+ const ADD_E_LETTERS = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "x"] // 21, skip j+v+w
74
+ const ADD_F_LETTERS = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "k", "l"] // 11, skip j
75
+
76
+ module.exports = {
77
+ // Addition F (interpretation of Mordecai's dream + colophon): Vulgate
78
+ // 10:4-13 + 11:1 -> LXX 10:3a-3l. Hanhart printed sequence in Esther 10.
79
+ ...mapAddition(10, 4, 10, 3, ADD_F_LETTERS, 10),
80
+ "11:1": { lxx: "10:3l", mt: null, eng: "11:1" }, // colophon
81
+
82
+ // Addition A part 1 (Mordecai's dream): Vulgate 11:2-12 -> LXX 1:1a-1l.
83
+ ...mapAddition(11, 2, 1, 1, ADD_A_LETTERS.slice(0, 11), 11),
84
+ // Addition A part 2 (Mordecai uncovers the eunuchs' plot): Vulgate
85
+ // 12:1-6 -> LXX 1:1m-1r.
86
+ ...mapAddition(12, 1, 1, 1, ADD_A_LETTERS.slice(11), 6),
87
+
88
+ // Bridge: canonical Vulgate/MT 1:1 corresponds to Hanhart LXX 1:1s, the
89
+ // last letter-suffixed slot before the chapter resumes at 1:2.
90
+ "1:1": { lxx: "1:1s", mt: "1:1", eng: "1:1" },
91
+
92
+ // Addition B (king's first decree): Vulgate 13:1-7 -> LXX 3:13a-3:13g.
93
+ ...mapAddition(13, 1, 3, 13, ADD_B_LETTERS, 7),
94
+
95
+ // Addition C (Mordecai's prayer + Esther's prayer):
96
+ // Mordecai: Vulgate 13:8-18 -> LXX 4:17a-4:17l (11 letters)
97
+ // Esther: Vulgate 14:1-19 -> LXX 4:17m-4:17z (13 letters);
98
+ // Vulgate 14:14-19 collapse to 4:17z because Hanhart's
99
+ // addition concludes at 4:17z (24-letter run total).
100
+ ...mapAddition(13, 8, 4, 17, ADD_C_LETTERS.slice(0, 11), 11),
101
+ ...mapAddition(14, 1, 4, 17, ADD_C_LETTERS.slice(11), 19),
102
+
103
+ // Addition D (Esther approaches the king): Vulgate 15:1-16 distributed
104
+ // across two LXX anchors (5:1a-1f then 5:2a-2b = 8 letters total).
105
+ // Vulgate 15:9-16 collapse to 5:2b because Hanhart's addition is shorter.
106
+ ...mapSegmentedAddition(15, 1, [
107
+ { chapter: 5, verse: 1, letters: ["a", "b", "c", "d", "e", "f"] },
108
+ { chapter: 5, verse: 2, letters: ["a", "b"] },
109
+ ], 16),
110
+
111
+ // Addition E (king's second decree): Vulgate 16:1-24 -> LXX 8:12a-12u, 12x
112
+ // (21 letters; Hanhart skips v and w). Vulgate 16:22-24 collapse to 8:12x.
113
+ ...mapAddition(16, 1, 8, 12, ADD_E_LETTERS, 24),
114
+ }
@@ -36,187 +36,187 @@ module.exports = {
36
36
  },
37
37
  "20:45": {
38
38
  lxx: "21:1",
39
- mt: "20:45",
39
+ mt: "21:1",
40
40
  eng: "20:45",
41
41
  },
42
42
  "20:46": {
43
43
  lxx: "21:2",
44
- mt: "20:46",
44
+ mt: "21:2",
45
45
  eng: "20:46",
46
46
  },
47
47
  "20:47": {
48
48
  lxx: "21:3",
49
- mt: "20:47",
49
+ mt: "21:3",
50
50
  eng: "20:47",
51
51
  },
52
52
  "20:48": {
53
53
  lxx: "21:4",
54
- mt: "20:48",
54
+ mt: "21:4",
55
55
  eng: "20:48",
56
56
  },
57
57
  "20:49": {
58
58
  lxx: "21:5",
59
- mt: "20:49",
59
+ mt: "21:5",
60
60
  eng: "20:49",
61
61
  },
62
62
  "21:1": {
63
63
  lxx: "21:6",
64
- mt: "21:1",
64
+ mt: "21:6",
65
65
  eng: "21:1",
66
66
  },
67
67
  "21:2": {
68
68
  lxx: "21:7",
69
- mt: "21:2",
69
+ mt: "21:7",
70
70
  eng: "21:2",
71
71
  },
72
72
  "21:3": {
73
73
  lxx: "21:8",
74
- mt: "21:3",
74
+ mt: "21:8",
75
75
  eng: "21:3",
76
76
  },
77
77
  "21:4": {
78
78
  lxx: "21:9",
79
- mt: "21:4",
79
+ mt: "21:9",
80
80
  eng: "21:4",
81
81
  },
82
82
  "21:5": {
83
83
  lxx: "21:10",
84
- mt: "21:5",
84
+ mt: "21:10",
85
85
  eng: "21:5",
86
86
  },
87
87
  "21:6": {
88
88
  lxx: "21:11",
89
- mt: "21:6",
89
+ mt: "21:11",
90
90
  eng: "21:6",
91
91
  },
92
92
  "21:7": {
93
93
  lxx: "21:12",
94
- mt: "21:7",
94
+ mt: "21:12",
95
95
  eng: "21:7",
96
96
  },
97
97
  "21:8": {
98
98
  lxx: "21:13",
99
- mt: "21:8",
99
+ mt: "21:13",
100
100
  eng: "21:8",
101
101
  },
102
102
  "21:9": {
103
103
  lxx: "21:14",
104
- mt: "21:9",
104
+ mt: "21:14",
105
105
  eng: "21:9",
106
106
  },
107
107
  "21:10": {
108
108
  lxx: "21:15",
109
- mt: "21:10",
109
+ mt: "21:15",
110
110
  eng: "21:10",
111
111
  },
112
112
  "21:11": {
113
113
  lxx: "21:16",
114
- mt: "21:11",
114
+ mt: "21:16",
115
115
  eng: "21:11",
116
116
  },
117
117
  "21:12": {
118
118
  lxx: "21:17",
119
- mt: "21:12",
119
+ mt: "21:17",
120
120
  eng: "21:12",
121
121
  },
122
122
  "21:13": {
123
123
  lxx: "21:18",
124
- mt: "21:13",
124
+ mt: "21:18",
125
125
  eng: "21:13",
126
126
  },
127
127
  "21:14": {
128
128
  lxx: "21:19",
129
- mt: "21:14",
129
+ mt: "21:19",
130
130
  eng: "21:14",
131
131
  },
132
132
  "21:15": {
133
133
  lxx: "21:20",
134
- mt: "21:15",
134
+ mt: "21:20",
135
135
  eng: "21:15",
136
136
  },
137
137
  "21:16": {
138
138
  lxx: "21:21",
139
- mt: "21:16",
139
+ mt: "21:21",
140
140
  eng: "21:16",
141
141
  },
142
142
  "21:17": {
143
143
  lxx: "21:22",
144
- mt: "21:17",
144
+ mt: "21:22",
145
145
  eng: "21:17",
146
146
  },
147
147
  "21:18": {
148
148
  lxx: "21:23",
149
- mt: "21:18",
149
+ mt: "21:23",
150
150
  eng: "21:18",
151
151
  },
152
152
  "21:19": {
153
153
  lxx: "21:24",
154
- mt: "21:19",
154
+ mt: "21:24",
155
155
  eng: "21:19",
156
156
  },
157
157
  "21:20": {
158
158
  lxx: "21:25",
159
- mt: "21:20",
159
+ mt: "21:25",
160
160
  eng: "21:20",
161
161
  },
162
162
  "21:21": {
163
163
  lxx: "21:26",
164
- mt: "21:21",
164
+ mt: "21:26",
165
165
  eng: "21:21",
166
166
  },
167
167
  "21:22": {
168
168
  lxx: "21:27",
169
- mt: "21:22",
169
+ mt: "21:27",
170
170
  eng: "21:22",
171
171
  },
172
172
  "21:23": {
173
173
  lxx: "21:28",
174
- mt: "21:23",
174
+ mt: "21:28",
175
175
  eng: "21:23",
176
176
  },
177
177
  "21:24": {
178
178
  lxx: "21:29",
179
- mt: "21:24",
179
+ mt: "21:29",
180
180
  eng: "21:24",
181
181
  },
182
182
  "21:25": {
183
183
  lxx: "21:30",
184
- mt: "21:25",
184
+ mt: "21:30",
185
185
  eng: "21:25",
186
186
  },
187
187
  "21:26": {
188
188
  lxx: "21:31",
189
- mt: "21:26",
189
+ mt: "21:31",
190
190
  eng: "21:26",
191
191
  },
192
192
  "21:27": {
193
193
  lxx: "21:32",
194
- mt: "21:27",
194
+ mt: "21:32",
195
195
  eng: "21:27",
196
196
  },
197
197
  "21:28": {
198
198
  lxx: "21:33",
199
- mt: "21:28",
199
+ mt: "21:33",
200
200
  eng: "21:28",
201
201
  },
202
202
  "21:29": {
203
203
  lxx: "21:34",
204
- mt: "21:29",
204
+ mt: "21:34",
205
205
  eng: "21:29",
206
206
  },
207
207
  "21:30": {
208
208
  lxx: "21:35",
209
- mt: "21:30",
209
+ mt: "21:35",
210
210
  eng: "21:30",
211
211
  },
212
212
  "21:31": {
213
213
  lxx: "21:36",
214
- mt: "21:31",
214
+ mt: "21:36",
215
215
  eng: "21:31",
216
216
  },
217
217
  "21:32": {
218
218
  lxx: "21:37",
219
- mt: "21:32",
219
+ mt: "21:37",
220
220
  eng: "21:32",
221
221
  },
222
222
  }