@fpw/en-wiktionary-la-modules 0.1.2 → 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/modules/conjugation/LaVerb.d.ts +2 -1
- package/dist/modules/conjugation/LaVerb.js +200 -30
- 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/NominalType.d.ts +116 -0
- package/dist/modules/declination/NominalType.js +142 -0
- package/dist/modules/declination/NominalType.js.map +1 -0
- package/package.json +1 -1
- package/src/modules/conjugation/LaVerb.ts +202 -33
- 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/NominalType.ts +153 -0
|
@@ -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-adj/data
|
|
6
|
-
* Based on version: https://en.wiktionary.org/w/index.php?title=Module:la-adj/data&oldid=
|
|
6
|
+
* Based on version: https://en.wiktionary.org/w/index.php?title=Module:la-adj/data&oldid=68705243
|
|
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.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { NumberTantum, SegmentData } from "./LaNominal";
|
|
16
16
|
import { setNominalForm } from "./NominalForm";
|
|
17
|
+
import { NominalType } from "./NominalType";
|
|
17
18
|
|
|
18
19
|
export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => void)> = new Map([
|
|
19
20
|
["0", (data, args) => {
|
|
@@ -56,7 +57,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
56
57
|
let stem = args[0];
|
|
57
58
|
let original: string | undefined;
|
|
58
59
|
|
|
59
|
-
if (data.types.has(
|
|
60
|
+
if (data.types.has(NominalType.Er)) {
|
|
60
61
|
if (stem.match(/er$/)) {
|
|
61
62
|
data.subtitles.push("nominative masculine singular in '-er'");
|
|
62
63
|
data.categories.push("Latin first and second declension " + data.pos + " with nominative masculine singular in -er");
|
|
@@ -77,10 +78,10 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
77
78
|
let am = "am";
|
|
78
79
|
let a_macron = "ā";
|
|
79
80
|
|
|
80
|
-
if (data.types.has(
|
|
81
|
+
if (data.types.has(NominalType.GreekA) || data.types.has(NominalType.GreekE)) {
|
|
81
82
|
data.subtitles.push("Greek-type");
|
|
82
83
|
data.categories.push("Latin first and second declension " + data.pos + " with Greek declension");
|
|
83
|
-
if (data.types.has(
|
|
84
|
+
if (data.types.has(NominalType.GreekA)) {
|
|
84
85
|
us = "os";
|
|
85
86
|
um = "on";
|
|
86
87
|
am = "ān";
|
|
@@ -142,7 +143,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
142
143
|
setNominalForm(data.forms, "loc_pl_f", [stem + "īs"]);
|
|
143
144
|
setNominalForm(data.forms, "loc_pl_n", [stem + "īs"]);
|
|
144
145
|
|
|
145
|
-
if (data.types.has(
|
|
146
|
+
if (data.types.has(NominalType.Ius)) {
|
|
146
147
|
data.subtitles.push("pronominal");
|
|
147
148
|
data.categories.push("Latin first and second declension " + data.pos + " with genitive singular in -ī̆us");
|
|
148
149
|
setNominalForm(data.forms, "gen_sg_m", [stem + "ī̆us"]);
|
|
@@ -151,7 +152,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
151
152
|
setNominalForm(data.forms, "dat_sg_m", [stem + "ī"]);
|
|
152
153
|
setNominalForm(data.forms, "dat_sg_f", [stem + "ī"]);
|
|
153
154
|
setNominalForm(data.forms, "dat_sg_n", [stem + "ī"]);
|
|
154
|
-
} else if (data.types.has(
|
|
155
|
+
} else if (data.types.has(NominalType.NotIus)) {
|
|
155
156
|
data.subtitles.push("non-pronominal");
|
|
156
157
|
}
|
|
157
158
|
|
|
@@ -159,7 +160,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
159
160
|
setNominalForm(data.forms, "voc_sg_m", ["mī"]);
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
if (data.types.has(
|
|
163
|
+
if (data.types.has(NominalType.Ic)) {
|
|
163
164
|
data.subtitles.push("'hic'-type");
|
|
164
165
|
let oc = "oc";
|
|
165
166
|
let oc_macron = "ōc";
|
|
@@ -201,6 +202,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
201
202
|
const stem = args[0];
|
|
202
203
|
setNominalForm(data.forms, "nom_sg_m", [stem + "a"]);
|
|
203
204
|
setNominalForm(data.forms, "nom_pl_m", [stem + "ae"]);
|
|
205
|
+
setNominalForm(data.forms, "nom_pl_n", [stem + "a"]);
|
|
204
206
|
|
|
205
207
|
setNominalForm(data.forms, "gen_sg_m", [stem + "ae"]);
|
|
206
208
|
setNominalForm(data.forms, "gen_pl_m", [stem + "ārum"]);
|
|
@@ -211,7 +213,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
211
213
|
setNominalForm(data.forms, "acc_sg_m", [stem + "am"]);
|
|
212
214
|
setNominalForm(data.forms, "acc_sg_n", [stem + "a"]);
|
|
213
215
|
setNominalForm(data.forms, "acc_pl_m", [stem + "ās"]);
|
|
214
|
-
setNominalForm(data.forms, "acc_pl_n", [stem + "
|
|
216
|
+
setNominalForm(data.forms, "acc_pl_n", [stem + "a"]);
|
|
215
217
|
|
|
216
218
|
setNominalForm(data.forms, "abl_sg_m", [stem + "ā"]);
|
|
217
219
|
setNominalForm(data.forms, "abl_pl_m", [stem + "īs"]);
|
|
@@ -234,7 +236,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
234
236
|
let um = "um";
|
|
235
237
|
let i_pl = "ī";
|
|
236
238
|
|
|
237
|
-
if (data.types.has(
|
|
239
|
+
if (data.types.has(NominalType.greek)) {
|
|
238
240
|
data.subtitles.push("Greek-type");
|
|
239
241
|
data.categories.push("Latin second declension " + data.pos + " with Greek declension");
|
|
240
242
|
us = "os";
|
|
@@ -325,7 +327,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
325
327
|
setNominalForm(data.forms, "voc_pl_m", [stem2 + "ēs"]);
|
|
326
328
|
setNominalForm(data.forms, "voc_pl_n", [stem2 + "ia"]);
|
|
327
329
|
|
|
328
|
-
if (data.types.has(
|
|
330
|
+
if (data.types.has(NominalType.Par)) {
|
|
329
331
|
data.subtitles.push("non-i-stem");
|
|
330
332
|
|
|
331
333
|
setNominalForm(data.forms, "nom_pl_n", [stem2 + "a"]);
|
|
@@ -337,13 +339,13 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
337
339
|
setNominalForm(data.forms, "loc_sg_n", [stem2 + "ī", stem2 + "e"]);
|
|
338
340
|
setNominalForm(data.forms, "acc_pl_n", [stem2 + "a"]);
|
|
339
341
|
setNominalForm(data.forms, "voc_pl_n", [stem2 + "a"]);
|
|
340
|
-
} else if (data.types.has(
|
|
342
|
+
} else if (data.types.has(NominalType.NotPar)) {
|
|
341
343
|
data.subtitles.push("i-stem");
|
|
342
344
|
}
|
|
343
345
|
|
|
344
346
|
const es_base = stem1.match(/^(.*)ēs$/);
|
|
345
347
|
if (es_base && es_base[1] == stem2) {
|
|
346
|
-
if (data.types.has(
|
|
348
|
+
if (data.types.has(NominalType.greek)) {
|
|
347
349
|
const note = "It is unknown if Classical Latin preserved (or would have preserved) the shortness of the original Greek short ending.";
|
|
348
350
|
setNominalForm(data.forms, "nom_sg_n", [stem2 + "es", stem2 + "ēs"]);
|
|
349
351
|
data.notes.set("nom_sg_n1", note);
|
|
@@ -354,7 +356,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
354
356
|
setNominalForm(data.forms, "voc_sg_n", [stem2 + "es", stem2 + "ēs"]);
|
|
355
357
|
data.notes.set("voc_sg_n1", note);
|
|
356
358
|
data.subtitles.push("Greek-type");
|
|
357
|
-
} else if (data.types.has(
|
|
359
|
+
} else if (data.types.has(NominalType.Notgreek)) {
|
|
358
360
|
data.subtitles.push("non-Greek-type");
|
|
359
361
|
}
|
|
360
362
|
}
|
|
@@ -364,7 +366,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
364
366
|
}],
|
|
365
367
|
["3-C", (data, args) => {
|
|
366
368
|
const stem = args[0];
|
|
367
|
-
data.types.add(
|
|
369
|
+
data.types.add(NominalType.Par);
|
|
368
370
|
const d = m_adj_decl.get("3-1");
|
|
369
371
|
if (!d) {
|
|
370
372
|
throw Error("Decl 3-1 not ready");
|
|
@@ -394,7 +396,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
394
396
|
setNominalForm(data.forms, "abl_sg_n", [stem2 + "e", stem2 + "ī"]);
|
|
395
397
|
data.notes.set("abl_sg_n2", "When used purely as an adjective.");
|
|
396
398
|
} else {
|
|
397
|
-
if (data.types.has(
|
|
399
|
+
if (data.types.has(NominalType.Participle)) {
|
|
398
400
|
setNominalForm(data.forms, "abl_sg_m", [stem2 + "e"]);
|
|
399
401
|
setNominalForm(data.forms, "abl_sg_n", [stem2 + "e"]);
|
|
400
402
|
} else {
|
|
@@ -584,15 +586,36 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
584
586
|
setNominalForm(data.forms, "nom_sg_f", ["illaec"]);
|
|
585
587
|
setNominalForm(data.forms, "nom_sg_n", ["illuc", "illoc"]);
|
|
586
588
|
setNominalForm(data.forms, "nom_pl_n", ["illaec"]);
|
|
589
|
+
setNominalForm(data.forms, "nom_pl_m", [""]);
|
|
590
|
+
setNominalForm(data.forms, "nom_pl_f", [""]);
|
|
587
591
|
|
|
588
|
-
setNominalForm(data.forms, "
|
|
589
|
-
setNominalForm(data.forms, "
|
|
590
|
-
setNominalForm(data.forms, "
|
|
591
|
-
setNominalForm(data.forms, "
|
|
592
|
+
setNominalForm(data.forms, "gen_sg_m", [""]);
|
|
593
|
+
setNominalForm(data.forms, "gen_sg_f", [""]);
|
|
594
|
+
setNominalForm(data.forms, "gen_sg_n", [""]);
|
|
595
|
+
setNominalForm(data.forms, "gen_pl_m", [""]);
|
|
596
|
+
setNominalForm(data.forms, "gen_pl_f", [""]);
|
|
597
|
+
setNominalForm(data.forms, "gen_pl_n", [""]);
|
|
598
|
+
|
|
599
|
+
setNominalForm(data.forms, "dat_sg_m", [""]);
|
|
600
|
+
setNominalForm(data.forms, "dat_sg_f", [""]);
|
|
601
|
+
setNominalForm(data.forms, "dat_sg_n", [""]);
|
|
602
|
+
setNominalForm(data.forms, "dat_pl_m", [""]);
|
|
603
|
+
setNominalForm(data.forms, "dat_pl_f", [""]);
|
|
604
|
+
setNominalForm(data.forms, "dat_pl_n", [""]);
|
|
605
|
+
|
|
606
|
+
setNominalForm(data.forms, "acc_sg_m", ["illunc"]);
|
|
607
|
+
setNominalForm(data.forms, "acc_sg_f", ["illanc"]);
|
|
608
|
+
setNominalForm(data.forms, "acc_sg_n", ["illuc", "illoc"]);
|
|
609
|
+
setNominalForm(data.forms, "acc_pl_m", [""]);
|
|
610
|
+
setNominalForm(data.forms, "acc_pl_f", [""]);
|
|
611
|
+
setNominalForm(data.forms, "acc_pl_n", ["illaec"]);
|
|
592
612
|
|
|
593
613
|
setNominalForm(data.forms, "abl_sg_m", ["illōc"]);
|
|
594
614
|
setNominalForm(data.forms, "abl_sg_f", ["illāc"]);
|
|
595
615
|
setNominalForm(data.forms, "abl_sg_n", ["illōc"]);
|
|
616
|
+
setNominalForm(data.forms, "abl_pl_m", [""]);
|
|
617
|
+
setNominalForm(data.forms, "abl_pl_f", [""]);
|
|
618
|
+
setNominalForm(data.forms, "abl_pl_n", [""]);
|
|
596
619
|
|
|
597
620
|
data.voc = false;
|
|
598
621
|
|
|
@@ -720,7 +743,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
720
743
|
setNominalForm(data.forms, "acc_sg_n", ["i"]);
|
|
721
744
|
}
|
|
722
745
|
} else if (args[0] == "ille") {
|
|
723
|
-
data.types.add(
|
|
746
|
+
data.types.add(NominalType.Ius);
|
|
724
747
|
const d = m_adj_decl.get("1&2");
|
|
725
748
|
if (!d) {
|
|
726
749
|
throw Error("Decl 1&2 not ready");
|
|
@@ -738,7 +761,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
738
761
|
data.voc = false;
|
|
739
762
|
data.categories = [];
|
|
740
763
|
} else if (args[0] == "iste") {
|
|
741
|
-
data.types.add(
|
|
764
|
+
data.types.add(NominalType.Ius);
|
|
742
765
|
const d = m_adj_decl.get("1&2");
|
|
743
766
|
if (!d) {
|
|
744
767
|
throw Error("Decl 1&2 not ready");
|
|
@@ -757,7 +780,7 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
757
780
|
|
|
758
781
|
data.categories = [];
|
|
759
782
|
} else if (args[0] == "ipse") {
|
|
760
|
-
data.types.add(
|
|
783
|
+
data.types.add(NominalType.Ius);
|
|
761
784
|
const d = m_adj_decl.get("1&2");
|
|
762
785
|
if (!d) {
|
|
763
786
|
throw Error("Decl 1&2 not ready");
|
|
@@ -783,8 +806,8 @@ export const m_adj_decl: Map<string, ((data: SegmentData, args: string[]) => voi
|
|
|
783
806
|
setNominalForm(data.forms, "acc_sg_f", ["quam"]);
|
|
784
807
|
setNominalForm(data.forms, "abl_sg_f", ["quā"]);
|
|
785
808
|
} else {
|
|
786
|
-
setNominalForm(data.forms, "acc_sg_f", ["quem"]);
|
|
787
|
-
setNominalForm(data.forms, "abl_sg_f", ["quō"]);
|
|
809
|
+
setNominalForm(data.forms, "acc_sg_f", ["quem", "quam"]);
|
|
810
|
+
setNominalForm(data.forms, "abl_sg_f", ["quō", "quā"]);
|
|
788
811
|
}
|
|
789
812
|
data.title = "relative/interrogative pronoun";
|
|
790
813
|
|