@fpw/en-wiktionary-la-modules 0.0.16 → 0.1.3
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/dist/LaEngine.d.ts +7 -8
- package/dist/LaEngine.js +1 -1
- package/dist/LaEngine.js.map +1 -1
- package/dist/modules/conjugation/LaVerb.d.ts +5 -3
- package/dist/modules/conjugation/LaVerb.js +207 -31
- package/dist/modules/conjugation/LaVerb.js.map +1 -1
- package/dist/modules/conjugation/VerbType.d.ts +5 -1
- package/dist/modules/conjugation/VerbType.js +4 -0
- package/dist/modules/conjugation/VerbType.js.map +1 -1
- package/dist/modules/declination/LaAdjData.d.ts +1 -1
- package/dist/modules/declination/LaAdjData.js +45 -24
- package/dist/modules/declination/LaAdjData.js.map +1 -1
- package/dist/modules/declination/LaNominal.d.ts +6 -3
- package/dist/modules/declination/LaNominal.js +190 -168
- package/dist/modules/declination/LaNominal.js.map +1 -1
- package/dist/modules/declination/LaNounData.js +65 -64
- package/dist/modules/declination/LaNounData.js.map +1 -1
- package/dist/modules/declination/LaPersonalPronoun.d.ts +7 -29
- package/dist/modules/declination/LaPersonalPronoun.js +73 -56
- package/dist/modules/declination/LaPersonalPronoun.js.map +1 -1
- package/dist/modules/declination/NominalType.d.ts +116 -0
- package/dist/modules/declination/NominalType.js +142 -0
- package/dist/modules/declination/NominalType.js.map +1 -0
- package/dist/modules/headword/HeadWord.d.ts +3 -3
- package/dist/modules/headword/HeadwordParser.d.ts +2 -2
- package/dist/modules/headword/HeadwordParser.js.map +1 -1
- package/package.json +8 -9
- package/src/LaEngine.ts +8 -9
- package/src/modules/conjugation/LaVerb.ts +213 -36
- package/src/modules/conjugation/VerbType.ts +4 -0
- package/src/modules/declination/LaAdjData.ts +47 -24
- package/src/modules/declination/LaNominal.ts +216 -184
- package/src/modules/declination/LaNounData.ts +67 -66
- package/src/modules/declination/LaPersonalPronoun.ts +76 -63
- package/src/modules/declination/NominalType.ts +153 -0
- package/src/modules/headword/HeadWord.ts +3 -3
- package/src/modules/headword/HeadwordParser.ts +18 -18
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* It was converted from Lua to TypeScript by Folke Will <folko@solhost.org>.
|
|
4
4
|
*
|
|
5
5
|
* Original source: https://en.wiktionary.org/wiki/Module:la-noun/data
|
|
6
|
-
* Based on version: https://en.wiktionary.org/w/index.php?title=Module:la-noun/data&oldid=
|
|
6
|
+
* Based on version: https://en.wiktionary.org/w/index.php?title=Module:la-noun/data&oldid=67964055
|
|
7
7
|
*
|
|
8
8
|
* Lua idioms, function and variable names kept as in the original in order to easily
|
|
9
9
|
* backport later changes to this implementation.
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { strip_macrons } from "../common";
|
|
16
16
|
import { NumberTantum, SegmentData } from "./LaNominal";
|
|
17
17
|
import { getNominalForm, setNominalForm } from "./NominalForm";
|
|
18
|
+
import { hasNominalType, NominalType } from "./NominalType";
|
|
18
19
|
|
|
19
20
|
export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => void)> = new Map([
|
|
20
21
|
["1", (data, args) => {
|
|
@@ -34,27 +35,27 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
34
35
|
setNominalForm(data.forms, "abl_pl", [stem + "īs"]);
|
|
35
36
|
setNominalForm(data.forms, "voc_pl", [stem + "ae"]);
|
|
36
37
|
|
|
37
|
-
if (data.types.has(
|
|
38
|
+
if (data.types.has(NominalType.Abus)) {
|
|
38
39
|
data.subtitles.push(["dative/ablative plural in ", "'-ābus'"]);
|
|
39
40
|
setNominalForm(data.forms, "dat_pl", [stem + "ābus"]);
|
|
40
41
|
setNominalForm(data.forms, "abl_pl", [stem + "ābus"]);
|
|
41
|
-
} else if (data.types.has(
|
|
42
|
+
} else if (data.types.has(NominalType.NotAbus)) {
|
|
42
43
|
data.subtitles.push(["dative/ablative plural in ", "'-īs'"]);
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
if (data.types.has(
|
|
46
|
+
if (data.types.has(NominalType.Am)) {
|
|
46
47
|
data.subtitles.push(["nominative/vocative singular in ", "'-ām'"]);
|
|
47
48
|
setNominalForm(data.forms, "nom_sg", [stem + "ām"]);
|
|
48
49
|
setNominalForm(data.forms, "acc_sg", [stem + "ām"]);
|
|
49
50
|
setNominalForm(data.forms, "voc_sg", [stem + "ām"]);
|
|
50
51
|
setNominalForm(data.forms, "abl_sg", [stem + "ām", stem + "ā"]);
|
|
51
|
-
} else if (data.types.has(
|
|
52
|
-
if (data.types.has(
|
|
52
|
+
} else if (data.types.has(NominalType.Greek)) {
|
|
53
|
+
if (data.types.has(NominalType.Ma)) {
|
|
53
54
|
data.subtitles.push("masculine Greek-type with nominative singular in '-ās'");
|
|
54
55
|
setNominalForm(data.forms, "nom_sg", [stem + "ās"]);
|
|
55
56
|
setNominalForm(data.forms, "acc_sg", [stem + "ān"]);
|
|
56
57
|
setNominalForm(data.forms, "voc_sg", [stem + "ā"]);
|
|
57
|
-
} else if (data.types.has(
|
|
58
|
+
} else if (data.types.has(NominalType.Me)) {
|
|
58
59
|
data.subtitles.push("masculine Greek-type with nominative singular in '-ēs'");
|
|
59
60
|
setNominalForm(data.forms, "nom_sg", [stem + "ēs"]);
|
|
60
61
|
setNominalForm(data.forms, "acc_sg", [stem + "ēn"]);
|
|
@@ -68,9 +69,9 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
68
69
|
setNominalForm(data.forms, "abl_sg", [stem + "ē"]);
|
|
69
70
|
setNominalForm(data.forms, "voc_sg", [stem + "ē"]);
|
|
70
71
|
}
|
|
71
|
-
} else if (data.types.has(
|
|
72
|
+
} else if (data.types.has(NominalType.NotGreek)) {
|
|
72
73
|
data.subtitles.push("non-Greek-type");
|
|
73
|
-
} else if (data.types.has(
|
|
74
|
+
} else if (data.types.has(NominalType.NotAm)) {
|
|
74
75
|
data.subtitles.push(["nominative/vocative singular in ", "'-a'"]);
|
|
75
76
|
}
|
|
76
77
|
|
|
@@ -97,7 +98,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
97
98
|
setNominalForm(data.forms, "abl_pl", [stem1 + "īs"]);
|
|
98
99
|
setNominalForm(data.forms, "voc_pl", [stem1 + "ī"]);
|
|
99
100
|
|
|
100
|
-
if (data.types.has(
|
|
101
|
+
if (data.types.has(NominalType.Neuter)) {
|
|
101
102
|
data.subtitles.push("neuter");
|
|
102
103
|
setNominalForm(data.forms, "nom_sg", [stem1 + "um"]);
|
|
103
104
|
setNominalForm(data.forms, "voc_sg", [stem1 + "um"]);
|
|
@@ -106,7 +107,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
106
107
|
setNominalForm(data.forms, "acc_pl", [stem1 + "a"]);
|
|
107
108
|
setNominalForm(data.forms, "voc_pl", [stem1 + "a"]);
|
|
108
109
|
|
|
109
|
-
if (data.types.has(
|
|
110
|
+
if (data.types.has(NominalType.Ium)) {
|
|
110
111
|
setNominalForm(data.forms, "nom_sg", [stem1 + "ium"]);
|
|
111
112
|
if (!data.declOpts.suppressOldGenitive) {
|
|
112
113
|
setNominalForm(data.forms, "gen_sg", [stem1 + "iī", stem1 + "ī"]);
|
|
@@ -128,7 +129,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
128
129
|
if (!data.declOpts.suppressOldGenitive) {
|
|
129
130
|
data.notes.set("gen_sg2", "Found in older Latin (until the Augustan Age).");
|
|
130
131
|
}
|
|
131
|
-
} else if (data.types.has(
|
|
132
|
+
} else if (data.types.has(NominalType.a)) {
|
|
132
133
|
data.subtitles.push("nominative/accusative/vocative plural in '-a'");
|
|
133
134
|
|
|
134
135
|
setNominalForm(data.forms, "nom_sg", [stem1 + "us"]);
|
|
@@ -138,12 +139,12 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
138
139
|
setNominalForm(data.forms, "nom_pl", [stem1 + "a"]);
|
|
139
140
|
setNominalForm(data.forms, "acc_pl", [stem1 + "a"]);
|
|
140
141
|
setNominalForm(data.forms, "voc_pl", [stem1 + "a"]);
|
|
141
|
-
} else if (data.types.has(
|
|
142
|
+
} else if (data.types.has(NominalType.Vom)) {
|
|
142
143
|
data.subtitles.push("nominative singular in '-om' after 'v'");
|
|
143
144
|
setNominalForm(data.forms, "nom_sg", [stem1 + "om"]);
|
|
144
145
|
setNominalForm(data.forms, "acc_sg", [stem1 + "om"]);
|
|
145
146
|
setNominalForm(data.forms, "voc_sg", [stem1 + "om"]);
|
|
146
|
-
} else if (data.types.has(
|
|
147
|
+
} else if (data.types.has(NominalType.Greek) && data.types.has(NominalType.Us)) {
|
|
147
148
|
data.subtitles.push("Greek-type");
|
|
148
149
|
data.subtitles.push("nominative/accusative/vocative in '-os'");
|
|
149
150
|
|
|
@@ -155,12 +156,12 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
155
156
|
setNominalForm(data.forms, "gen_pl", [stem1 + "ōn"]);
|
|
156
157
|
setNominalForm(data.forms, "acc_pl", [stem1 + "ē"]);
|
|
157
158
|
setNominalForm(data.forms, "voc_pl", [stem1 + "ē"]);
|
|
158
|
-
} else if (data.types.has(
|
|
159
|
+
} else if (data.types.has(NominalType.Greek)) {
|
|
159
160
|
data.subtitles.push("Greek-type");
|
|
160
161
|
setNominalForm(data.forms, "nom_sg", [stem1 + "on"]);
|
|
161
162
|
setNominalForm(data.forms, "acc_sg", [stem1 + "on"]);
|
|
162
163
|
setNominalForm(data.forms, "voc_sg", [stem1 + "on"]);
|
|
163
|
-
} else if (data.types.has(
|
|
164
|
+
} else if (data.types.has(NominalType.Us)) {
|
|
164
165
|
data.subtitles.push("nominative/accusative/vocative in '-us'");
|
|
165
166
|
setNominalForm(data.forms, "nom_sg", [stem1 + "us"]);
|
|
166
167
|
setNominalForm(data.forms, "acc_sg", [stem1 + "us"]);
|
|
@@ -169,10 +170,10 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
169
170
|
setNominalForm(data.forms, "nom_pl", [stem1 + "ī"]);
|
|
170
171
|
setNominalForm(data.forms, "acc_pl", [stem1 + "ōs"]);
|
|
171
172
|
setNominalForm(data.forms, "voc_pl", [stem1 + "ī"]);
|
|
172
|
-
} else if (data.types.has(
|
|
173
|
+
} else if (data.types.has(NominalType.NotGreek) || data.types.has(NominalType.NotUs)) {
|
|
173
174
|
data.subtitles.push("nominative/accusative/vocative in '-um'");
|
|
174
175
|
}
|
|
175
|
-
} else if (data.types.has(
|
|
176
|
+
} else if (data.types.has(NominalType.Er)) {
|
|
176
177
|
if (stem1.match(/[aiouy]r$/)) {
|
|
177
178
|
data.subtitles.push("nominative singular in '-r'");
|
|
178
179
|
} else {
|
|
@@ -192,7 +193,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
192
193
|
setNominalForm(data.forms, "acc_pl", [stem2 + "ōs"]);
|
|
193
194
|
setNominalForm(data.forms, "abl_pl", [stem2 + "īs"]);
|
|
194
195
|
setNominalForm(data.forms, "voc_pl", [stem2 + "ī"]);
|
|
195
|
-
} else if (data.types.has(
|
|
196
|
+
} else if (data.types.has(NominalType.Ius)) {
|
|
196
197
|
setNominalForm(data.forms, "nom_sg", [stem1 + "ius"]);
|
|
197
198
|
if (!data.declOpts.suppressOldGenitive) {
|
|
198
199
|
setNominalForm(data.forms, "gen_sg", [stem1 + "iī", stem1 + "ī"]);
|
|
@@ -203,7 +204,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
203
204
|
setNominalForm(data.forms, "acc_sg", [stem1 + "ium"]);
|
|
204
205
|
setNominalForm(data.forms, "abl_sg", [stem1 + "iō"]);
|
|
205
206
|
|
|
206
|
-
if (data.types.has(
|
|
207
|
+
if (data.types.has(NominalType.VocI)) {
|
|
207
208
|
setNominalForm(data.forms, "voc_sg", [stem1 + "ī"]);
|
|
208
209
|
} else {
|
|
209
210
|
setNominalForm(data.forms, "voc_sg", [stem1 + "ie"]);
|
|
@@ -219,32 +220,32 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
219
220
|
if (!data.declOpts.suppressOldGenitive) {
|
|
220
221
|
data.notes.set("gen_sg2", "Found in older Latin (until the Augustan Age).");
|
|
221
222
|
}
|
|
222
|
-
} else if (data.types.has(
|
|
223
|
+
} else if (data.types.has(NominalType.Vos)) {
|
|
223
224
|
data.subtitles.push("nominative singular in '-os' after 'v'");
|
|
224
225
|
setNominalForm(data.forms, "nom_sg", [stem1 + "os"]);
|
|
225
226
|
setNominalForm(data.forms, "acc_sg", [stem1 + "om"]);
|
|
226
|
-
} else if (data.types.has(
|
|
227
|
+
} else if (data.types.has(NominalType.Greek)) {
|
|
227
228
|
data.subtitles.push("Greek-type");
|
|
228
229
|
setNominalForm(data.forms, "nom_sg", [stem1 + "os"]);
|
|
229
230
|
setNominalForm(data.forms, "acc_sg", [stem1 + "on"]);
|
|
230
|
-
} else if (data.types.has(
|
|
231
|
+
} else if (data.types.has(NominalType.NotGreek)) {
|
|
231
232
|
data.subtitles.push("non-Greek-type");
|
|
232
233
|
}
|
|
233
234
|
|
|
234
|
-
if (data.types.has(
|
|
235
|
+
if (data.types.has(NominalType.GenPluM)) {
|
|
235
236
|
data.subtitles.push(["contracted", " genitive plural"]);
|
|
236
237
|
data.notes.set("gen_pl2", "Contraction found in poetry.");
|
|
237
|
-
if (data.types.has(
|
|
238
|
+
if (data.types.has(NominalType.Ius) || data.types.has(NominalType.Ium)) {
|
|
238
239
|
setNominalForm(data.forms, "gen_pl", [stem2 + "iōrum", stem2 + "ium"]);
|
|
239
240
|
} else {
|
|
240
241
|
setNominalForm(data.forms, "gen_pl", [stem2 + "ōrum", stem2 + "um"]);
|
|
241
242
|
}
|
|
242
|
-
} else if (data.types.has(
|
|
243
|
+
} else if (data.types.has(NominalType.NotGenPluM)) {
|
|
243
244
|
data.subtitles.push(["normal", " genitive plural"]);
|
|
244
245
|
}
|
|
245
246
|
|
|
246
247
|
if (data.loc) {
|
|
247
|
-
if (data.types.has(
|
|
248
|
+
if (data.types.has(NominalType.Ius) || data.types.has(NominalType.Ium)) {
|
|
248
249
|
setNominalForm(data.forms, "loc_sg", [stem2 + "iī"]);
|
|
249
250
|
setNominalForm(data.forms, "loc_pl", [stem2 + "iīs"]);
|
|
250
251
|
} else {
|
|
@@ -292,7 +293,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
292
293
|
}
|
|
293
294
|
|
|
294
295
|
for (const [acc_sg_subtype, [endings, title]] of acc_sg_i_stem_subtypes) {
|
|
295
|
-
if (data.types
|
|
296
|
+
if (hasNominalType(data.types, "not_" + acc_sg_subtype)) {
|
|
296
297
|
not_acc_sg_i_stem_subtype = true;
|
|
297
298
|
break;
|
|
298
299
|
}
|
|
@@ -308,17 +309,17 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
308
309
|
}
|
|
309
310
|
|
|
310
311
|
for (const [abl_sg_subtype, [endings, title]] of abl_sg_i_stem_subtypes) {
|
|
311
|
-
if (data.types
|
|
312
|
+
if (hasNominalType(data.types, "not_" + abl_sg_subtype)) {
|
|
312
313
|
not_abl_sg_i_stem_subtype = true;
|
|
313
314
|
break;
|
|
314
315
|
}
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
|
|
318
|
-
if (data.types.has(
|
|
319
|
+
if (data.types.has(NominalType.Greek)) {
|
|
319
320
|
data.subtitles.push("Greek-type");
|
|
320
321
|
|
|
321
|
-
if (data.types.has(
|
|
322
|
+
if (data.types.has(NominalType.Er)) {
|
|
322
323
|
data.subtitles.push("variant with nominative singular in '-ēr'");
|
|
323
324
|
stem1 = extract_stem(stem1, "ēr");
|
|
324
325
|
|
|
@@ -335,7 +336,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
335
336
|
setNominalForm(data.forms, "acc_pl", [stem1 + "erēs"]);
|
|
336
337
|
setNominalForm(data.forms, "abl_pl", [stem1 + "eribus"]);
|
|
337
338
|
setNominalForm(data.forms, "voc_pl", [stem1 + "erēs"]);
|
|
338
|
-
} else if (data.types.has(
|
|
339
|
+
} else if (data.types.has(NominalType.On)) {
|
|
339
340
|
data.subtitles.push("variant with nominative singular in '-ōn'");
|
|
340
341
|
stem1 = extract_stem(stem1, "ōn");
|
|
341
342
|
|
|
@@ -352,7 +353,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
352
353
|
setNominalForm(data.forms, "acc_pl", [stem1 + "ontēs", stem1 + "ontās"]);
|
|
353
354
|
setNominalForm(data.forms, "abl_pl", [stem1 + "ontibus"]);
|
|
354
355
|
setNominalForm(data.forms, "voc_pl", [stem1 + "ontēs"]);
|
|
355
|
-
} else if (data.types.has(
|
|
356
|
+
} else if (data.types.has(NominalType.I)) {
|
|
356
357
|
data.subtitles.push("i-stem");
|
|
357
358
|
setNominalForm(data.forms, "gen_sg", [stem2 + "is", stem2 + "eōs", stem2 + "ios"]);
|
|
358
359
|
setNominalForm(data.forms, "acc_sg", [stem2 + "im", stem2 + "in", stem2 + "em"]);
|
|
@@ -367,7 +368,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
367
368
|
setNominalForm(data.forms, "acc_pl", [stem2 + "ēs", stem2 + "eis"]);
|
|
368
369
|
setNominalForm(data.forms, "voc_pl", [stem2 + "ēs", stem2 + "eis"]);
|
|
369
370
|
|
|
370
|
-
if (data.types.has(
|
|
371
|
+
if (data.types.has(NominalType.poetic_esi)) {
|
|
371
372
|
setNominalForm(data.forms, "dat_pl", [stem2 + "ibus", stem2 + "esi"]);
|
|
372
373
|
setNominalForm(data.forms, "abl_pl", [stem2 + "ibus", stem2 + "esi"]);
|
|
373
374
|
data.notes.set("dat_pl2", "Primarily in poetry.");
|
|
@@ -391,11 +392,11 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
391
392
|
data.notes.set("voc_sg2", "In poetry.");
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
|
-
} else if (data.types.has(
|
|
395
|
+
} else if (data.types.has(NominalType.NotGreek)) {
|
|
395
396
|
data.subtitles.push("non-Greek-type");
|
|
396
397
|
}
|
|
397
398
|
|
|
398
|
-
if (data.types.has(
|
|
399
|
+
if (data.types.has(NominalType.Polis)) {
|
|
399
400
|
stem1 = extract_stem(stem1, "polis");
|
|
400
401
|
data.subtitles.push("i-stem, partially Greek-type");
|
|
401
402
|
setNominalForm(data.forms, "nom_sg", [stem1 + "polis"]);
|
|
@@ -404,17 +405,17 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
404
405
|
setNominalForm(data.forms, "acc_sg", [stem1 + "polim", stem1 + "polin"]);
|
|
405
406
|
setNominalForm(data.forms, "abl_sg", [stem1 + "polī"]);
|
|
406
407
|
setNominalForm(data.forms, "voc_sg", [stem1 + "polis", stem1 + "polī"]);
|
|
407
|
-
} else if (data.types.has(
|
|
408
|
+
} else if (data.types.has(NominalType.NotPolis)) {
|
|
408
409
|
data.subtitles.push(non_i_stem_type());
|
|
409
410
|
}
|
|
410
411
|
|
|
411
|
-
if (data.types.has(
|
|
412
|
+
if (data.types.has(NominalType.Neuter)) {
|
|
412
413
|
data.subtitles.push("neuter");
|
|
413
414
|
|
|
414
415
|
setNominalForm(data.forms, "acc_sg", [stem1]);
|
|
415
416
|
|
|
416
|
-
if (data.types.has(
|
|
417
|
-
if (data.types.has(
|
|
417
|
+
if (data.types.has(NominalType.I)) {
|
|
418
|
+
if (data.types.has(NominalType.Pure)) {
|
|
418
419
|
data.subtitles.push("“pure” i-stem");
|
|
419
420
|
|
|
420
421
|
setNominalForm(data.forms, "abl_sg", [stem2 + "ī"]);
|
|
@@ -436,8 +437,8 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
436
437
|
setNominalForm(data.forms, "acc_pl", [stem2 + "a"]);
|
|
437
438
|
setNominalForm(data.forms, "voc_pl", [stem2 + "a"]);
|
|
438
439
|
}
|
|
439
|
-
} else if (data.types.has(
|
|
440
|
-
if (data.types.has(
|
|
440
|
+
} else if (data.types.has(NominalType.I) || acc_sg_i_stem_subtype || abl_sg_i_stem_subtype) {
|
|
441
|
+
if (data.types.has(NominalType.NotNeuter)) {
|
|
441
442
|
data.subtitles.push("non-neuter i-stem");
|
|
442
443
|
} else {
|
|
443
444
|
data.subtitles.push("i-stem");
|
|
@@ -477,11 +478,11 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
477
478
|
break;
|
|
478
479
|
}
|
|
479
480
|
}
|
|
480
|
-
} else if (data.types.has(
|
|
481
|
+
} else if (data.types.has(NominalType.Neuter) && data.types.has(NominalType.NotI)) {
|
|
481
482
|
data.subtitles.push("non-neuter " + non_i_stem_type());
|
|
482
|
-
} else if (data.types.has(
|
|
483
|
+
} else if (data.types.has(NominalType.NotNeuter)) {
|
|
483
484
|
data.subtitles.push("non-neuter");
|
|
484
|
-
} else if (data.types.has(
|
|
485
|
+
} else if (data.types.has(NominalType.NotI)) {
|
|
485
486
|
data.subtitles.push(non_i_stem_type());
|
|
486
487
|
}
|
|
487
488
|
|
|
@@ -512,17 +513,17 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
512
513
|
setNominalForm(data.forms, "abl_pl", [stem + "ibus"]);
|
|
513
514
|
setNominalForm(data.forms, "voc_pl", [stem + "ūs"]);
|
|
514
515
|
|
|
515
|
-
if (data.types.has(
|
|
516
|
+
if (data.types.has(NominalType.Echo)) {
|
|
516
517
|
data.subtitles.push("nominative/vocative singular in '-ō'");
|
|
517
518
|
setNominalForm(data.forms, "nom_sg", [stem + "ō"]);
|
|
518
519
|
setNominalForm(data.forms, "voc_sg", [stem + "ō"]);
|
|
519
|
-
} else if (data.types.has(
|
|
520
|
+
} else if (data.types.has(NominalType.argo)) {
|
|
520
521
|
data.subtitles.push("nominative/accusative/vocative singular in '-ō', ablative singular in '-uī'");
|
|
521
522
|
setNominalForm(data.forms, "nom_sg", [stem + "ō"]);
|
|
522
523
|
setNominalForm(data.forms, "acc_sg", [stem + "ō"]);
|
|
523
524
|
setNominalForm(data.forms, "abl_sg", [stem + "uī"]);
|
|
524
525
|
setNominalForm(data.forms, "voc_sg", [stem + "ō"]);
|
|
525
|
-
} else if (data.types.has(
|
|
526
|
+
} else if (data.types.has(NominalType.Callisto)) {
|
|
526
527
|
data.subtitles.push("all cases except the genitive singular in '-ō'");
|
|
527
528
|
setNominalForm(data.forms, "nom_sg", [stem + "ō"]);
|
|
528
529
|
setNominalForm(data.forms, "dat_sg", [stem + "ō"]);
|
|
@@ -531,7 +532,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
531
532
|
setNominalForm(data.forms, "voc_sg", [stem + "ō"]);
|
|
532
533
|
}
|
|
533
534
|
|
|
534
|
-
if (data.types.has(
|
|
535
|
+
if (data.types.has(NominalType.Neuter)) {
|
|
535
536
|
data.subtitles.push("neuter");
|
|
536
537
|
|
|
537
538
|
setNominalForm(data.forms, "nom_sg", [stem + "ū"]);
|
|
@@ -544,12 +545,12 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
544
545
|
setNominalForm(data.forms, "voc_pl", [stem + "ua"]);
|
|
545
546
|
}
|
|
546
547
|
|
|
547
|
-
if (data.types.has(
|
|
548
|
+
if (data.types.has(NominalType.Ubus)) {
|
|
548
549
|
data.subtitles.push("dative/ablative plural in '-ubus'");
|
|
549
550
|
|
|
550
551
|
setNominalForm(data.forms, "dat_pl", [stem + "ubus"]);
|
|
551
552
|
setNominalForm(data.forms, "abl_pl", [stem + "ubus"]);
|
|
552
|
-
} else if (data.types.has(
|
|
553
|
+
} else if (data.types.has(NominalType.NotUbus)) {
|
|
553
554
|
data.subtitles.push("'-ibus'");
|
|
554
555
|
}
|
|
555
556
|
|
|
@@ -562,7 +563,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
562
563
|
["5", (data, args) => {
|
|
563
564
|
let stem = args[0];
|
|
564
565
|
|
|
565
|
-
if (data.types.has(
|
|
566
|
+
if (data.types.has(NominalType.i)) {
|
|
566
567
|
stem = stem + "i";
|
|
567
568
|
}
|
|
568
569
|
|
|
@@ -580,7 +581,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
580
581
|
setNominalForm(data.forms, "abl_pl", [stem + "ēbus"]);
|
|
581
582
|
setNominalForm(data.forms, "voc_pl", [stem + "ēs"]);
|
|
582
583
|
|
|
583
|
-
if (data.types.has(
|
|
584
|
+
if (data.types.has(NominalType.i)) {
|
|
584
585
|
setNominalForm(data.forms, "gen_sg", [stem + "ēī"]);
|
|
585
586
|
setNominalForm(data.forms, "dat_sg", [stem + "ēī"]);
|
|
586
587
|
}
|
|
@@ -613,7 +614,7 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
613
614
|
}
|
|
614
615
|
}],
|
|
615
616
|
["indecl", (data, args) => {
|
|
616
|
-
data.title = "Not declined; used only in the nominative and accusative singular
|
|
617
|
+
data.title = "Not declined; used only in the nominative and accusative singular";
|
|
617
618
|
|
|
618
619
|
const stem = args[0];
|
|
619
620
|
|
|
@@ -860,20 +861,20 @@ export const m_noun_decl: Map<string, ((data: SegmentData, args: string[]) => vo
|
|
|
860
861
|
}],
|
|
861
862
|
]);
|
|
862
863
|
|
|
863
|
-
const acc_sg_i_stem_subtypes = new Map<
|
|
864
|
-
[
|
|
865
|
-
[
|
|
866
|
-
[
|
|
867
|
-
[
|
|
868
|
-
[
|
|
869
|
-
[
|
|
864
|
+
const acc_sg_i_stem_subtypes = new Map<NominalType, [string[], string]>([
|
|
865
|
+
[NominalType.AccIm, [["im"], "accusative singular in '-im'"]],
|
|
866
|
+
[NominalType.AccImIn, [["im", "in"], "accusative singular in '-im' or '-in'"]],
|
|
867
|
+
[NominalType.AccImInEm, [["im", "in", "em"], "accusative singular in '-im', '-in' or '-em'"]],
|
|
868
|
+
[NominalType.AccImEm, [["im", "em"], "accusative singular in '-im' or '-em'"]],
|
|
869
|
+
[NominalType.AccImOccEm, [["im", "em"], "accusative singular in '-im' or occasionally '-em'"]],
|
|
870
|
+
[NominalType.AccEmIm, [["em", "im"], "accusative singular in '-em' or '-im'"]],
|
|
870
871
|
]);
|
|
871
872
|
|
|
872
|
-
const abl_sg_i_stem_subtypes = new Map<
|
|
873
|
-
[
|
|
874
|
-
[
|
|
875
|
-
[
|
|
876
|
-
[
|
|
873
|
+
const abl_sg_i_stem_subtypes = new Map<NominalType, [string[], string]>([
|
|
874
|
+
[NominalType.AblI, [["ī"], "ablative singular in '-ī'"]],
|
|
875
|
+
[NominalType.AblIE, [["ī", "e"], "ablative singular in '-ī' or '-e'"]],
|
|
876
|
+
[NominalType.AblEI, [["e", "ī"], "ablative singular in '-e' or '-ī'"]],
|
|
877
|
+
[NominalType.AblEOccI, [["e", "ī"], "ablative singular in '-e' or occasionally '-ī'"]],
|
|
877
878
|
]);
|
|
878
879
|
|
|
879
880
|
function extract_stem(form: string, ending: string): string {
|
|
@@ -1,77 +1,90 @@
|
|
|
1
|
-
import { FormMap } from "../common";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
NomSg1 = "nom_1s",
|
|
5
|
-
GenSg1 = "gen_1s",
|
|
6
|
-
DatSg1 = "dat_1s",
|
|
7
|
-
AccSg1 = "acc_1s",
|
|
8
|
-
AblSg1 = "abl_1s",
|
|
9
|
-
|
|
10
|
-
NomPl1 = "nom_1p",
|
|
11
|
-
GenPl1 = "gen_1p",
|
|
12
|
-
DatPl1 = "dat_1p",
|
|
13
|
-
AccPl1 = "acc_1p",
|
|
14
|
-
AblPl1 = "abl_1p",
|
|
15
|
-
|
|
16
|
-
NomSg2 = "nom_2s",
|
|
17
|
-
GenSg2 = "gen_2s",
|
|
18
|
-
DatSg2 = "dat_2s",
|
|
19
|
-
AccSg2 = "acc_2s",
|
|
20
|
-
AblSg2 = "abl_2s",
|
|
21
|
-
|
|
22
|
-
NomPl2 = "nom_2p",
|
|
23
|
-
GenPl2 = "gen_2p",
|
|
24
|
-
DatPl2 = "dat_2p",
|
|
25
|
-
AccPl2 = "acc_2p",
|
|
26
|
-
AblPl2 = "abl_2p",
|
|
27
|
-
|
|
28
|
-
GenRef = "gen_ref",
|
|
29
|
-
DatRef = "dat_ref",
|
|
30
|
-
AccRef = "acc_ref",
|
|
31
|
-
AblRef = "abl_ref",
|
|
32
|
-
}
|
|
1
|
+
import { ArgMap, FormMap } from "../common";
|
|
2
|
+
import { NumberTantum } from "./LaNominal";
|
|
3
|
+
import { NominalForm } from "./NominalForm";
|
|
33
4
|
|
|
34
5
|
export interface PersonalPronounData {
|
|
35
6
|
templateType: "ppron";
|
|
36
|
-
forms: FormMap<
|
|
7
|
+
forms: FormMap<NominalForm>;
|
|
8
|
+
pers: 1 | 2 | 3;
|
|
9
|
+
num: NumberTantum;
|
|
37
10
|
}
|
|
38
11
|
|
|
39
12
|
export class LaPersonalPronoun {
|
|
40
|
-
public make_data(): PersonalPronounData {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[PPronForm.DatSg1, ["mihi"]],
|
|
46
|
-
[PPronForm.AblSg1, ["mē"]],
|
|
47
|
-
|
|
48
|
-
[PPronForm.NomPl1, ["nōs"]],
|
|
49
|
-
[PPronForm.AccPl1, ["nōs"]],
|
|
50
|
-
[PPronForm.GenPl1, ["nostrum", "nostrī"]],
|
|
51
|
-
[PPronForm.DatPl1, ["nōbīs"]],
|
|
52
|
-
[PPronForm.AblPl1, ["nōbīs"]],
|
|
53
|
-
|
|
54
|
-
[PPronForm.NomSg2, ["tū"]],
|
|
55
|
-
[PPronForm.AccSg2, ["tē"]],
|
|
56
|
-
[PPronForm.GenSg2, ["tuī"]],
|
|
57
|
-
[PPronForm.DatSg2, ["tibi", "tibī"]],
|
|
58
|
-
[PPronForm.AblSg2, ["tē"]],
|
|
13
|
+
public make_data(args: ArgMap): PersonalPronounData {
|
|
14
|
+
const lemma = args.get("1");
|
|
15
|
+
let forms: Map<NominalForm, string[]>;
|
|
16
|
+
let num: NumberTantum;
|
|
17
|
+
let pers: 1 | 2 | 3;
|
|
59
18
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
19
|
+
switch (lemma) {
|
|
20
|
+
case "ego":
|
|
21
|
+
forms = new Map<NominalForm, string[]>([
|
|
22
|
+
[NominalForm.NomSg, ["ego"]],
|
|
23
|
+
[NominalForm.AccSg, ["mē"]],
|
|
24
|
+
[NominalForm.GenSg, ["meī"]],
|
|
25
|
+
[NominalForm.DatSg, ["mihi"]],
|
|
26
|
+
[NominalForm.AblSg, ["mē"]],
|
|
27
|
+
]);
|
|
28
|
+
pers = 1;
|
|
29
|
+
num = NumberTantum.Singular;
|
|
30
|
+
break;
|
|
31
|
+
case "nōs":
|
|
32
|
+
forms = new Map<NominalForm, string[]>([
|
|
33
|
+
[NominalForm.NomPl, ["nōs"]],
|
|
34
|
+
[NominalForm.AccPl, ["nōs"]],
|
|
35
|
+
[NominalForm.GenPl, ["nostrum", "nostrī"]],
|
|
36
|
+
[NominalForm.DatPl, ["nōbīs"]],
|
|
37
|
+
[NominalForm.AblPl, ["nōbīs"]],
|
|
38
|
+
]);
|
|
39
|
+
pers = 1;
|
|
40
|
+
num = NumberTantum.Plural;
|
|
41
|
+
break;
|
|
42
|
+
case "tū":
|
|
43
|
+
forms = new Map<NominalForm, string[]>([
|
|
44
|
+
[NominalForm.NomSg, ["tū"]],
|
|
45
|
+
[NominalForm.AccSg, ["tē"]],
|
|
46
|
+
[NominalForm.GenSg, ["tuī"]],
|
|
47
|
+
[NominalForm.DatSg, ["tibi", "tibī"]],
|
|
48
|
+
[NominalForm.AblSg, ["tē"]],
|
|
49
|
+
]);
|
|
50
|
+
pers = 2;
|
|
51
|
+
num = NumberTantum.Singular;
|
|
52
|
+
break;
|
|
53
|
+
case "vōs":
|
|
54
|
+
forms = new Map<NominalForm, string[]>([
|
|
55
|
+
[NominalForm.NomPl, ["vōs"]],
|
|
56
|
+
[NominalForm.AccPl, ["vōs"]],
|
|
57
|
+
[NominalForm.GenPl, ["vestrum", "vestrī"]],
|
|
58
|
+
[NominalForm.DatPl, ["vōbīs"]],
|
|
59
|
+
[NominalForm.AblPl, ["vōbīs"]],
|
|
60
|
+
]);
|
|
61
|
+
pers = 2;
|
|
62
|
+
num = NumberTantum.Plural;
|
|
63
|
+
break;
|
|
64
|
+
case "sē":
|
|
65
|
+
forms = new Map<NominalForm, string[]>([
|
|
66
|
+
[NominalForm.AccSg, ["sē", "sēsē"]],
|
|
67
|
+
[NominalForm.GenSg, ["suī"]],
|
|
68
|
+
[NominalForm.DatSg, ["sibi"]],
|
|
69
|
+
[NominalForm.AblSg, ["sē", "sēsē"]],
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
[NominalForm.AccPl, ["sē", "sēsē"]],
|
|
72
|
+
[NominalForm.GenPl, ["suī"]],
|
|
73
|
+
[NominalForm.DatPl, ["sibi"]],
|
|
74
|
+
[NominalForm.AblPl, ["sē", "sēsē"]],
|
|
75
|
+
]);
|
|
76
|
+
pers = 3;
|
|
77
|
+
num = NumberTantum.Both;
|
|
78
|
+
break;
|
|
79
|
+
default:
|
|
80
|
+
throw Error(`Unknown ppron lemma: ${lemma}`);
|
|
81
|
+
}
|
|
71
82
|
|
|
72
83
|
return {
|
|
73
84
|
templateType: "ppron",
|
|
74
|
-
forms: forms
|
|
85
|
+
forms: forms,
|
|
86
|
+
pers: pers,
|
|
87
|
+
num: num,
|
|
75
88
|
};
|
|
76
89
|
}
|
|
77
90
|
}
|