@fpw/en-wiktionary-la-modules 0.2.2 → 0.3.1
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/LICENSE +75 -75
- package/README.md +19 -15
- package/dist/LaEngine.d.ts +23 -23
- package/dist/LaEngine.js +64 -66
- package/dist/index.d.ts +12 -11
- package/dist/index.js +12 -28
- package/dist/modules/common.d.ts +67 -66
- package/dist/modules/common.js +145 -157
- package/dist/modules/conjugation/LaVerb.d.ts +118 -109
- package/dist/modules/conjugation/LaVerb.js +2861 -2295
- package/dist/modules/conjugation/VerbAffix.d.ts +18 -18
- package/dist/modules/conjugation/VerbAffix.js +19 -23
- package/dist/modules/conjugation/VerbForm.d.ts +204 -182
- package/dist/modules/conjugation/VerbForm.js +215 -199
- package/dist/modules/conjugation/VerbType.d.ts +54 -40
- package/dist/modules/conjugation/VerbType.js +66 -58
- package/dist/modules/declination/LaAdjData.d.ts +16 -16
- package/dist/modules/declination/LaAdjData.js +1474 -908
- package/dist/modules/declination/LaNominal.d.ts +136 -130
- package/dist/modules/declination/LaNominal.js +1884 -1804
- package/dist/modules/declination/LaNounData.d.ts +16 -2
- package/dist/modules/declination/LaNounData.js +935 -855
- package/dist/modules/declination/LaPersonalPronoun.d.ts +12 -12
- package/dist/modules/declination/LaPersonalPronoun.js +80 -85
- package/dist/modules/declination/NominalForm.d.ts +85 -69
- package/dist/modules/declination/NominalForm.js +101 -91
- package/dist/modules/declination/NominalType.d.ts +191 -120
- package/dist/modules/declination/NominalType.js +211 -146
- package/dist/modules/headword/HeadWord.d.ts +107 -107
- package/dist/modules/headword/HeadWord.js +28 -32
- package/dist/modules/headword/HeadwordParser.d.ts +29 -29
- package/dist/modules/headword/HeadwordParser.js +456 -452
- package/package.json +23 -15
- package/dist/LaEngine.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/modules/common.js.map +0 -1
- package/dist/modules/conjugation/LaVerb.js.map +0 -1
- package/dist/modules/conjugation/VerbAffix.js.map +0 -1
- package/dist/modules/conjugation/VerbForm.js.map +0 -1
- package/dist/modules/conjugation/VerbType.js.map +0 -1
- package/dist/modules/declination/LaAdjData.js.map +0 -1
- package/dist/modules/declination/LaNominal.js.map +0 -1
- package/dist/modules/declination/LaNounData.js.map +0 -1
- package/dist/modules/declination/LaPersonalPronoun.js.map +0 -1
- package/dist/modules/declination/NominalForm.js.map +0 -1
- package/dist/modules/declination/NominalType.js.map +0 -1
- package/dist/modules/headword/HeadWord.js.map +0 -1
- package/dist/modules/headword/HeadwordParser.js.map +0 -1
- package/src/LaEngine.ts +0 -86
- package/src/index.ts +0 -16
- package/src/modules/common.ts +0 -164
- package/src/modules/conjugation/LaVerb.ts +0 -2669
- package/src/modules/conjugation/VerbAffix.ts +0 -18
- package/src/modules/conjugation/VerbForm.ts +0 -223
- package/src/modules/conjugation/VerbType.ts +0 -55
- package/src/modules/declination/LaAdjData.ts +0 -1036
- package/src/modules/declination/LaNominal.ts +0 -2025
- package/src/modules/declination/LaNounData.ts +0 -897
- package/src/modules/declination/LaPersonalPronoun.ts +0 -92
- package/src/modules/declination/NominalForm.ts +0 -89
- package/src/modules/declination/NominalType.ts +0 -157
- package/src/modules/headword/HeadWord.ts +0 -132
- package/src/modules/headword/HeadwordParser.ts +0 -515
|
@@ -1,109 +1,118 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a complete re-implementation of Wiktionary's Module:la-verb, developed by Benwing2.
|
|
3
|
-
* It was converted from Lua to TypeScript by Folke Will <folko@solhost.org>.
|
|
4
|
-
*
|
|
5
|
-
* A few new options to suppress certain rate forms were added.
|
|
6
|
-
*
|
|
7
|
-
* Original source: https://en.wiktionary.org/wiki/Module:la-verb
|
|
8
|
-
* Based on version
|
|
9
|
-
*
|
|
10
|
-
* Lua idioms, function and variable names kept as in the original in order to easily
|
|
11
|
-
* backport later changes to this implementation.
|
|
12
|
-
*
|
|
13
|
-
* For that reason, it's suggested to add a type-aware wrapper around this class and leave
|
|
14
|
-
* this code unchanged instead of improving the types and use of idioms in this class.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
import { ArgMap, FormMap } from "../common";
|
|
18
|
-
import { VerbAffix } from "./VerbAffix";
|
|
19
|
-
import { VerbForm } from "./VerbForm";
|
|
20
|
-
import { VerbType } from "./VerbType";
|
|
21
|
-
export
|
|
22
|
-
export
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
private
|
|
61
|
-
private
|
|
62
|
-
private
|
|
63
|
-
private
|
|
64
|
-
private
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
private
|
|
73
|
-
private
|
|
74
|
-
private
|
|
75
|
-
private
|
|
76
|
-
private
|
|
77
|
-
private
|
|
78
|
-
private
|
|
79
|
-
private
|
|
80
|
-
private
|
|
81
|
-
private
|
|
82
|
-
private
|
|
83
|
-
private
|
|
84
|
-
private
|
|
85
|
-
private
|
|
86
|
-
private
|
|
87
|
-
private
|
|
88
|
-
private
|
|
89
|
-
private
|
|
90
|
-
private
|
|
91
|
-
private
|
|
92
|
-
private
|
|
93
|
-
private
|
|
94
|
-
private
|
|
95
|
-
private
|
|
96
|
-
private
|
|
97
|
-
private
|
|
98
|
-
private
|
|
99
|
-
private
|
|
100
|
-
private
|
|
101
|
-
private
|
|
102
|
-
private
|
|
103
|
-
private
|
|
104
|
-
private
|
|
105
|
-
private
|
|
106
|
-
private
|
|
107
|
-
private
|
|
108
|
-
private
|
|
109
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This is a complete re-implementation of Wiktionary's Module:la-verb, developed by Benwing2.
|
|
3
|
+
* It was converted from Lua to TypeScript by Folke Will <folko@solhost.org>.
|
|
4
|
+
*
|
|
5
|
+
* A few new options to suppress certain rate forms were added.
|
|
6
|
+
*
|
|
7
|
+
* Original source: https://en.wiktionary.org/wiki/Module:la-verb
|
|
8
|
+
* Based on version 2026-03-03
|
|
9
|
+
*
|
|
10
|
+
* Lua idioms, function and variable names kept as in the original in order to easily
|
|
11
|
+
* backport later changes to this implementation.
|
|
12
|
+
*
|
|
13
|
+
* For that reason, it's suggested to add a type-aware wrapper around this class and leave
|
|
14
|
+
* this code unchanged instead of improving the types and use of idioms in this class.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
import { ArgMap, FormMap } from "../common.js";
|
|
18
|
+
import { VerbAffix } from "./VerbAffix.js";
|
|
19
|
+
import { VerbForm } from "./VerbForm.js";
|
|
20
|
+
import { VerbType } from "./VerbType.js";
|
|
21
|
+
export type ConjType = "1st" | "2nd" | "3rd" | "3rd-io" | "3rd/4th" | "4th" | "irreg";
|
|
22
|
+
export type GenderType = "m" | "f" | "n" | "mp" | "fp" | "np";
|
|
23
|
+
export interface ConjOptions {
|
|
24
|
+
suppressPerfectEre?: boolean;
|
|
25
|
+
suppressPassiveRe?: boolean;
|
|
26
|
+
suppressUndVariants?: boolean;
|
|
27
|
+
suppressIPerfect?: boolean;
|
|
28
|
+
suppressPoet?: boolean;
|
|
29
|
+
suppressArchaic?: boolean;
|
|
30
|
+
ireWithShortPerfInf?: boolean;
|
|
31
|
+
reorderEdere?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface VerbInflectionData {
|
|
34
|
+
templateType: "conjugation";
|
|
35
|
+
info: ConjugationInfo;
|
|
36
|
+
data: ConjugationData;
|
|
37
|
+
}
|
|
38
|
+
export interface ConjugationInfo {
|
|
39
|
+
lemma: string;
|
|
40
|
+
orig_lemma: string;
|
|
41
|
+
conj: ConjType;
|
|
42
|
+
conj_subtype?: ConjType;
|
|
43
|
+
subtypes: Set<VerbType>;
|
|
44
|
+
verb: string;
|
|
45
|
+
prefix: string;
|
|
46
|
+
pres_stem: string;
|
|
47
|
+
perf_stem: string[];
|
|
48
|
+
supine_stem: string[];
|
|
49
|
+
sigm_stem: string[];
|
|
50
|
+
}
|
|
51
|
+
export interface ConjugationData {
|
|
52
|
+
forms: FormMap<VerbForm>;
|
|
53
|
+
presuf: Map<VerbAffix, string>;
|
|
54
|
+
categories: string[];
|
|
55
|
+
footnotes: FormMap<string>;
|
|
56
|
+
overriding_lemma: string[];
|
|
57
|
+
gender: GenderType;
|
|
58
|
+
}
|
|
59
|
+
export declare class LaVerb {
|
|
60
|
+
private non_generic_slots;
|
|
61
|
+
private generic_slots;
|
|
62
|
+
private irreg_verbs_to_conj_type;
|
|
63
|
+
private allowed_subtypes;
|
|
64
|
+
private static potential_lemma_slots;
|
|
65
|
+
private conjugations;
|
|
66
|
+
private irreg_conjugations;
|
|
67
|
+
private options;
|
|
68
|
+
constructor(options?: ConjOptions);
|
|
69
|
+
make_data(args: ArgMap): VerbInflectionData;
|
|
70
|
+
static get_valid_forms(raw_forms: string[] | undefined): string[];
|
|
71
|
+
static get_lemma_forms(data: ConjugationData, do_linked: boolean): string[];
|
|
72
|
+
private setup_conjs;
|
|
73
|
+
private set_3rd_conj_categories;
|
|
74
|
+
private add_conj_missing_stem_categories;
|
|
75
|
+
private iter_slots;
|
|
76
|
+
private initialize_slots;
|
|
77
|
+
private detect_decl_and_subtypes;
|
|
78
|
+
private get_resolved_gender;
|
|
79
|
+
private get_subtype_by_ending;
|
|
80
|
+
private split_prefix_and_base;
|
|
81
|
+
private get_regular_stems;
|
|
82
|
+
private ine;
|
|
83
|
+
private add_forms;
|
|
84
|
+
private add_23_forms;
|
|
85
|
+
private add_2_forms;
|
|
86
|
+
private add_form;
|
|
87
|
+
private insert_if_not;
|
|
88
|
+
private make_pres_1st;
|
|
89
|
+
private make_pres_2nd;
|
|
90
|
+
private handle_old_impf;
|
|
91
|
+
private handle_old_futr;
|
|
92
|
+
private make_pres_3rd;
|
|
93
|
+
private make_pres_3rd_io;
|
|
94
|
+
private make_pres_4th;
|
|
95
|
+
private make_pres_3rd_4th;
|
|
96
|
+
private make_perf_and_supine;
|
|
97
|
+
private make_perf;
|
|
98
|
+
private make_sigm;
|
|
99
|
+
private make_supine;
|
|
100
|
+
private make_gerund;
|
|
101
|
+
private has_perf_in_s_or_x;
|
|
102
|
+
private form_contains;
|
|
103
|
+
private ivi_ive;
|
|
104
|
+
private postprocess;
|
|
105
|
+
private suppress;
|
|
106
|
+
private static form_is_empty;
|
|
107
|
+
private make_perfect_passive;
|
|
108
|
+
private make_term_link;
|
|
109
|
+
private override;
|
|
110
|
+
private add_prefix_suffix;
|
|
111
|
+
private notes_override;
|
|
112
|
+
private set_linked_forms;
|
|
113
|
+
private setup_irreg_conjs;
|
|
114
|
+
private lengthen_prefix;
|
|
115
|
+
private shorten_prefix;
|
|
116
|
+
private volo_malo_nolo;
|
|
117
|
+
private fio;
|
|
118
|
+
}
|