Coverage for src/wiktextract/extractor/el/section_titles.py: 100%
27 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-03 05:44 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-03 05:44 +0000
1# https://simple.wiktionary.org/wiki/Category:Part_of_speech_templates
2import re
3from enum import Enum, auto
4from typing import Literal, TypedDict
7class Heading(Enum):
8 Err = auto()
9 Ignored = auto()
10 POS = auto()
11 Etym = auto()
12 Pron = auto() # Pronunciation
13 Infl = auto()
14 Related = auto()
15 Transliterations = auto()
16 Synonyms = auto()
17 Homonyms = auto()
18 Antonyms = auto()
19 Translations = auto()
20 Derived = auto()
21 Ref = auto()
22 Notes = auto()
25Tags = list[str]
26POSName = Literal[
27 "", # Used as default
28 "ERROR_UNKNOWN_POS",
29 "abbrev",
30 "adj",
31 "adv",
32 "adv_phrase",
33 "affix",
34 "article",
35 "character",
36 "conj",
37 "contraction",
38 "det",
39 "infix",
40 "intj",
41 "name",
42 "noun",
43 "num",
44 "particle",
45 "phrase",
46 "prefix",
47 "prep",
48 "pron", # pronoun
49 "romanization",
50 "root",
51 "suffix",
52 "symbol",
53 "verb",
54]
55POSMap = TypedDict(
56 "POSMap",
57 {
58 # TODO: Use Typing.Required (3.11>=) when python 3.10 support drops
59 "pos": POSName,
60 # "debug" is legacy from [en], might be implemented
61 "debug": str,
62 "tags": Tags,
63 },
64 total=False,
65)
67# Main entries for different kinds of POS headings; no aliases
68# XXX translate these
69POS_HEADINGS: dict[str, POSMap] = {
70 # "": {"pos": "", "tags": [""],
71 # άρθρο: article // article // article of a charter, law, contract etc.
72 # // limb
73 "άρθρο": {"pos": "article"},
74 # έκφραση - πολυλεκτικός όρος: έκφραση: expression '' ???,
75 # πολυλεκτικός: polylectic όρος: term (word, phrase; limitation,
76 # restriction) // definition, stipulation // clause // article όρος:
77 # mount, mountain
78 "έκφραση - πολυλεκτικός όρος": {"pos": "phrase"},
79 # έκφραση και επίρρημα (επιρρηματική έκφραση): έκφραση: expression
80 # και: and // also // plus, and // past (time) επίρρημα: adverb (lexical
81 # category) επιρρηματική: [επιρρηματικός: adverbial, relating to an
82 # adverb] // Nominative feminine singular form of επιρρηματικός
83 # (epirrimatikós). // Accusative feminine singular form of επιρρηματικός
84 # (epirrimatikós). // Vocative feminine singular form of επιρρηματικός
85 # (epirrimatikós). έκφραση: expression
86 "έκφραση και επίρρημα (επιρρηματική έκφραση)": {"pos": "adv_phrase"},
87 # έκφραση του bask: έκφραση: expression του: [ο: the definite
88 # masculine singular article. the] // genitive masculine singular of ο
89 # (o) (the) // genitive neuter singular of ο (o) (the) του: him, it //
90 # his, its 'bask' ???,
91 ## "bask in something"
92 ## "EXPRESSING 'BASK'" -> phrases?
93 ## No special handling
94 "έκφραση του": {"pos": "phrase"},
95 # έκφραση: expression
96 "έκφραση": {"pos": "phrase"},
97 # ένθημα: ένθημα: infix, interfix
98 "ένθημα": {"pos": "infix"},
99 # αμετάβατο ρήμα: αμετάβατο: [αμετάβατος: intransitive] // Accusative
100 # masculine singular form of αμετάβατος (ametávatos). // Nominative,
101 # accusative and vocative neuter singular form of αμετάβατος
102 # (ametávatos). ρήμα: verb
103 "αμετάβατο ρήμα": {"pos": "verb", "tags": ["intransitive"]},
104 "απαρέμφατο": {"pos": "verb", "tags": ["infinitive"]},
105 # αντωνυμία: αντωνυμία: pronoun // antonymy
106 "αντωνυμία": {"pos": "pron"},
107 # αριθμητικό: αριθμητικό: numeral αριθμητικό: [αριθμητικός:
108 # arithmetical, numerical] // Accusative masculine singular form of
109 # αριθμητικός (arithmitikós). // Nominative, accusative and vocative
110 # neuter singular form of αριθμητικός (arithmitikós).
111 "αριθμητικό": {"pos": "num", "tags": ["number"]},
112 # βαθμός επιθέτου: βαθμός: grade (of job, exams, position in
113 # employment) // rank // degree (unit of temperature) // (plural) marks,
114 # grades // degree (severity of burns) // degree (of an adjective)
115 # επιθέτου: [επίθετο: adjective // surname] // genitive singular of
116 # επίθετο (epítheto)
117 "βαθμός επιθέτου": {"pos": "adj", "tags": ["comparative"]},
118 # βιβλίο φράσεων: βιβλίο: book 'φράσεων' ???,
119 "βιβλίο φράσεων": {"pos": "phrase"},
120 # γερουνδιακό: 'γερουνδιακό' ???,
121 "γερουνδιακό": {"pos": "verb", "tags": ["participle", "gerund"]},
122 # γερούνδιο: γερούνδιο: gerund
123 "γερούνδιο": {"pos": "verb", "tags": ["participle", "gerund"]},
124 # γνωμικά: 'γνωμικά' ???,
125 "γνωμικά": {"pos": "phrase"},
126 # γραμματικό στοιχείο: γραμματικό: [γραμματικός: grammatical (relating
127 # to grammar) // grammatical (using correct grammar)] // [γραμματικός:
128 # grammarian // scribe, secretary] // Accusative masculine singular form
129 # of γραμματικός (grammatikós). // Nominative, accusative and vocative
130 # neuter singular form of γραμματικός (grammatikós). γραμματικό:
131 # [γραμματικός: grammatical (relating to grammar) // grammatical (using
132 # correct grammar)] // [γραμματικός: grammarian // scribe, secretary] //
133 # Accusative singular form of γραμματικός (grammatikós). στοιχείο: unit,
134 # element, cell (a portion of a whole) // element // unit, element, cell
135 # (a portion of a whole) // item of data, piece of information // unit,
136 # element, cell (a portion of a whole) // letter, piece of type // unit,
137 # element, cell (a portion of a whole) // cell, battery // unit,
138 # element, cell (a portion of a whole) // subset of a population
139 "γραμματικό στοιχείο": {"pos": "particle"},
140 # διλεκτικό ουσιαστικό: 'διλεκτικό' ???, ουσιαστικό: noun,
141 # substantive
142 # two-word noun
143 "διλεκτικό ουσιαστικό": {"pos": "noun"},
144 # επίθετο - έκφραση: επίθετο: adjective // surname '' ???, έκφραση:
145 # expression
146 "επίθετο - έκφραση": {"pos": "adj"},
147 # επίθετο - ουσιαστικό: επίθετο: adjective // surname '' ???,
148 # ουσιαστικό: noun, substantive
149 "επίθετο - ουσιαστικό": {"pos": "adj"},
150 # επίθετο ή ουσιαστικό: επίθετο: adjective // surname ή: or // either
151 # … or ουσιαστικό: noun, substantive
152 "επίθετο ή ουσιαστικό": {"pos": "adj", "tags": ["adjective", "noun"]},
153 # επίθετο και επίρρημα: επίθετο: adjective // surname και: and // also
154 # // plus, and // past (time) επίρρημα: adverb (lexical category)
155 "επίθετο και επίρρημα": {"pos": "adj", "tags": ["adjective", "adverb"]},
156 # επίθετο και ουσιαστικό: επίθετο: adjective // surname και: and //
157 # also // plus, and // past (time) ουσιαστικό: noun, substantive
158 "επίθετο και ουσιαστικό": {"pos": "adj", "tags": ["adjective", "noun"]},
159 # επίθετο, επιφώνημα, επίρρημα: επίθετο: adjective // surname
160 # επιφώνημα: interjection, exclamation επίρρημα: adverb (lexical
161 # category)
162 "επίθετο, επιφώνημα, επίρρημα": {"pos": "adj"},
163 # επίθετο, ουσιαστικό, ρήμα: επίθετο: adjective // surname ουσιαστικό:
164 # noun, substantive ρήμα: verb
165 "επίθετο, ουσιαστικό, ρήμα": {"pos": "adj"},
166 # επίθετο, ουσιαστικό: επίθετο: adjective // surname ουσιαστικό: noun,
167 # substantive
168 "επίθετο, ουσιαστικό": {"pos": "adj"},
169 # επίθετο: επίθετο: adjective // surname
170 "επίθετο": {"pos": "adj"},
171 # επίθημα για το σχηματισμό ουδέτερων ουσιαστικών: επίθημα: suffix
172 # για: for // for // for, by // for // about το: [ο: the definite
173 # masculine singular article. the] // nominative neuter singular of ο
174 # (o) (the) // accusative neuter singular of ο (o) (the) το: it (3rd
175 # person neuter singular, nominative) // it (3rd person neuter singular,
176 # accusative) 'σχηματισμό' ???, ουδέτερων: [ουδέτερος: neuter, sexless
177 # // neutral, non-aligned // the gender: neuter // neutral] // Genitive
178 # masculine plural form of ουδέτερος (oudéteros). // Genitive feminine
179 # plural form of ουδέτερος (oudéteros). // Genitive neuter plural form
180 # of ουδέτερος (oudéteros). 'ουσιαστικών' ???,
181 "επίθημα για το σχηματισμό ουδέτερων ουσιαστικών": {"pos": "suffix"},
182 # επίθημα: επίθημα: suffix
183 "επίθημα": {"pos": "suffix"},
184 # επίρρημα - επιφώνημα: επίρρημα: adverb (lexical category) '' ???,
185 # επιφώνημα: interjection, exclamation
186 "επίρρημα - επιφώνημα": {"pos": "adv_phrase"},
187 # επίρρημα, επίθετο: επίρρημα: adverb (lexical category) επίθετο:
188 # adjective // surname
189 "επίρρημα, επίθετο": {"pos": "adv"},
190 # επίρρημα, κλιτικός τύπος επιθέτου: επίρρημα: adverb (lexical
191 # category) 'κλιτικός' ???, τύπος: sort, type, mould, stamp (of a
192 # person character) // model, type (of car, etc) // shape, form // the
193 # press, the newspapers collectively // formality, convention // formula
194 # // a man, a guy, a chap επιθέτου: [επίθετο: adjective // surname] //
195 # genitive singular of επίθετο (epítheto)
196 "επίρρημα, κλιτικός τύπος επιθέτου": {"pos": "adv"},
197 # επίρρημα, ουσιαστικό: επίρρημα: adverb (lexical category)
198 # ουσιαστικό: noun, substantive
199 "επίρρημα, ουσιαστικό": {"pos": "adv"},
200 # επίρρημα: επίρρημα: adverb (lexical category)
201 "επίρρημα": {"pos": "adv"},
202 # επιθετικό συνθετικό: 'επιθετικό' ???, συνθετικό: combining form
203 # συνθετικό: [συνθετικός: synthetic // composite, component] //
204 # Accusative masculine singular form of συνθετικός (synthetikós). //
205 # Nominative, accusative and vocative neuter singular form of συνθετικός
206 # (synthetikós).
207 "επιθετικό συνθετικό": {"pos": "adj"},
208 # επιρρηματική έκφραση: επιρρηματική: [επιρρηματικός: adverbial,
209 # relating to an adverb] // Nominative feminine singular form of
210 # επιρρηματικός (epirrimatikós). // Accusative feminine singular form of
211 # επιρρηματικός (epirrimatikós). // Vocative feminine singular form of
212 # επιρρηματικός (epirrimatikós). έκφραση: expression
213 "επιρρηματική έκφραση": {"pos": "adv_phrase"},
214 # επιφώνημα - ουσιαστικό: επιφώνημα: interjection, exclamation '' ???,
215 # ουσιαστικό: noun, substantive
216 "επιφώνημα - ουσιαστικό": {"pos": "intj"},
217 # επιφώνημα και ουσιαστικό: επιφώνημα: interjection, exclamation και:
218 # and // also // plus, and // past (time) ουσιαστικό: noun, substantive
219 "επιφώνημα και ουσιαστικό": {"pos": "intj"},
220 # επιφώνημα: επιφώνημα: interjection, exclamation
221 "επιφώνημα": {"pos": "intj"},
222 # θηλυκό: θηλυκό: woman, female θηλυκό: [θηλυκός: female (feminine
223 # gender) // feminine (female person or animal)] // Accusative masculine
224 # singular form of θηλυκός (thilykós). // Nominative, accusative and
225 # vocative neuter singular form of θηλυκός (thilykós).
226 "θηλυκό": {"pos": "noun", "tags": ["feminine"]},
227 # κάντζι: 'κάντζι' ???,
228 "κάντζι": {"pos": "character", "tags": ["kanji"]},
229 # κατάληξη αρσενικών επιθέτων: κατάληξη: ending, termination // result
230 # or outcome // ending, suffix αρσενικών: [αρσενικός: masculine] //
231 # Genitive masculine plural form of αρσενικός (arsenikós). // Genitive
232 # feminine plural form of αρσενικός (arsenikós). // Genitive neuter
233 # plural form of αρσενικός (arsenikós). επιθέτων: [επίθετο: adjective //
234 # surname] // genitive plural of επίθετο (epítheto)
235 "κατάληξη αρσενικών επιθέτων": {
236 "pos": "suffix",
237 "tags": ["masculine", "adjective"],
238 },
239 # κατάληξη αρσενικών ουσιαστικών: κατάληξη: ending, termination //
240 # result or outcome // ending, suffix αρσενικών: [αρσενικός: masculine]
241 # // Genitive masculine plural form of αρσενικός (arsenikós). //
242 # Genitive feminine plural form of αρσενικός (arsenikós). // Genitive
243 # neuter plural form of αρσενικός (arsenikós). 'ουσιαστικών' ???,
244 "κατάληξη αρσενικών ουσιαστικών": {
245 "pos": "suffix",
246 "tags": ["masculine", "noun"],
247 },
248 # κατάληξη επιρρημάτων: κατάληξη: ending, termination // result or
249 # outcome // ending, suffix επιρρημάτων: [επίρρημα: adverb (lexical
250 # category)] // Genitive plural form of επίρρημα (epírrima).
251 "κατάληξη επιρρημάτων": {"pos": "suffix", "tags": ["adverbial"]},
252 # κατάληξη θηλυκών ουσιαστικών: κατάληξη: ending, termination //
253 # result or outcome // ending, suffix θηλυκών: [θηλυκός: female
254 # (feminine gender) // feminine (female person or animal)] // Genitive
255 # masculine plural form of θηλυκός (thilykós). // Genitive feminine
256 # plural form of θηλυκός (thilykós). // Genitive neuter plural form of
257 # θηλυκός (thilykós). θηλυκών: [θηλυκό: woman, female] // [θηλυκό:
258 # [θηλυκός: female (feminine gender) // feminine (female person or
259 # animal)] // Accusative masculine singular form of θηλυκός (thilykós).
260 # // Nominative, accusative and vocative neuter singular form of θηλυκός
261 # (thilykós).] // Genitive plural form of θηλυκό (thilykó).
262 # 'ουσιαστικών' ???,
263 "κατάληξη θηλυκών ουσιαστικών": {
264 "pos": "suffix",
265 "tags": ["feminine", "noun"],
266 },
267 # κατάληξη ουδέτερων ουσιαστικών: κατάληξη: ending, termination //
268 # result or outcome // ending, suffix ουδέτερων: [ουδέτερος: neuter,
269 # sexless // neutral, non-aligned // the gender: neuter // neutral] //
270 # Genitive masculine plural form of ουδέτερος (oudéteros). // Genitive
271 # feminine plural form of ουδέτερος (oudéteros). // Genitive neuter
272 # plural form of ουδέτερος (oudéteros). 'ουσιαστικών' ???,
273 "κατάληξη ουδέτερων ουσιαστικών": {
274 "pos": "suffix",
275 "tags": ["neuter", "noun"],
276 },
277 # κατάληξη ρημάτων: κατάληξη: ending, termination // result or outcome
278 # // ending, suffix ρημάτων: [ρήμα: verb] // Genitive plural form of
279 # ρήμα (ríma).
280 "κατάληξη ρημάτων": {"pos": "suffix", "tags": ["verb"]},
281 # κατάληξη: κατάληξη: ending, termination // result or outcome //
282 # ending, suffix
283 "κατάληξη": {"pos": "suffix"},
284 # κλιτικός τύπος άρθρου: 'κλιτικός' ???, τύπος: sort, type, mould,
285 # stamp (of a person character) // model, type (of car, etc) // shape,
286 # form // the press, the newspapers collectively // formality,
287 # convention // formula // a man, a guy, a chap άρθρου: [άρθρο: article
288 # // article // article of a charter, law, contract etc. // limb] //
289 # Genitive singular form of άρθρο (árthro).
290 "κλιτικός τύπος άρθρου": {"pos": "article", "tags": ["form-of"]},
291 # κλιτικός τύπος αντωνυμίας: 'κλιτικός' ???, τύπος: sort, type,
292 # mould, stamp (of a person character) // model, type (of car, etc) //
293 # shape, form // the press, the newspapers collectively // formality,
294 # convention // formula // a man, a guy, a chap αντωνυμίας: [αντωνυμία:
295 # pronoun // antonymy] // Genitive singular form of αντωνυμία
296 # (antonymía).
297 "κλιτικός τύπος αντωνυμίας": {"pos": "pron", "tags": ["form-of"]},
298 # κλιτικός τύπος αριθμητικού: 'κλιτικός' ???, τύπος: sort, type,
299 # mould, stamp (of a person character) // model, type (of car, etc) //
300 # shape, form // the press, the newspapers collectively // formality,
301 # convention // formula // a man, a guy, a chap αριθμητικού:
302 # [αριθμητικός: arithmetical, numerical] // Genitive masculine and
303 # neuter singular form of αριθμητικός (arithmitikós). αριθμητικού:
304 # [αριθμητικό: numeral] // [αριθμητικό: [αριθμητικός: arithmetical,
305 # numerical] // Accusative masculine singular form of αριθμητικός
306 # (arithmitikós). // Nominative, accusative and vocative neuter singular
307 # form of αριθμητικός (arithmitikós).] // Genitive singular form of
308 # αριθμητικό (arithmitikó).
309 "κλιτικός τύπος αριθμητικού": {"pos": "num", "tags": ["number", "form-of"]},
310 # κλιτικός τύπος γερουνδιακού: 'κλιτικός' ???, τύπος: sort, type,
311 # mould, stamp (of a person character) // model, type (of car, etc) //
312 # shape, form // the press, the newspapers collectively // formality,
313 # convention // formula // a man, a guy, a chap 'γερουνδιακού' ???,
314 "κλιτικός τύπος γερουνδιακού": {
315 "pos": "verb",
316 "tags": ["participle", "gerund", "form-of"],
317 },
318 # κλιτικός τύπος επιθέτου: 'κλιτικός' ???, τύπος: sort, type, mould,
319 # stamp (of a person character) // model, type (of car, etc) // shape,
320 # form // the press, the newspapers collectively // formality,
321 # convention // formula // a man, a guy, a chap επιθέτου: [επίθετο:
322 # adjective // surname] // genitive singular of επίθετο (epítheto)
323 "κλιτικός τύπος επιθέτου": {"pos": "adj", "tags": ["form-of"]},
324 "κλιτικός τύπος επιθήματος": {"pos": "suffix"},
325 # κλιτικός τύπος επιρρήματος: 'κλιτικός' ???, τύπος: sort, type,
326 # mould, stamp (of a person character) // model, type (of car, etc) //
327 # shape, form // the press, the newspapers collectively // formality,
328 # convention // formula // a man, a guy, a chap επιρρήματος: [επίρρημα:
329 # adverb (lexical category)] // Genitive singular form of επίρρημα
330 # (epírrima).
331 "κλιτικός τύπος επιρρήματος": {"pos": "adv", "tags": ["form-of"]},
332 # κλιτικός τύπος κυρίου ονόματος: 'κλιτικός' ???, τύπος: sort, type,
333 # mould, stamp (of a person character) // model, type (of car, etc) //
334 # shape, form // the press, the newspapers collectively // formality,
335 # convention // formula // a man, a guy, a chap κυρίου: [κύριος: mister
336 # (title conferred on an adult male) // master (someone who has control
337 # over something or someone) // sir (an address to any male)] //
338 # [κύριος: main, principal, most important] // Genitive singular form of
339 # κύριος (kýrios). ονόματος: [όνομα: name // name, reputation // noun
340 # (sensu lato), a word class including substantives (nouns, sensu
341 # stricto) and adjectives] // Genitive singular form of όνομα (ónoma).
342 "κλιτικός τύπος κυρίου ονόματος": {"pos": "name", "tags": ["form-of"]},
343 # κλιτικός τύπος μετοχής: 'κλιτικός' ???, τύπος: sort, type, mould,
344 # stamp (of a person character) // model, type (of car, etc) // shape,
345 # form // the press, the newspapers collectively // formality,
346 # convention // formula // a man, a guy, a chap μετοχής: [μετοχή:
347 # participle // share, stock] // Genitive singular form of μετοχή
348 # (metochí).
349 "κλιτικός τύπος μετοχής": {
350 "pos": "verb",
351 "tags": ["participle", "form-of"],
352 },
353 # κλιτικός τύπος ουσιαστικού (διλεκτικό ουσιαστικό): 'κλιτικός' ???,
354 # τύπος: sort, type, mould, stamp (of a person character) // model, type
355 # (of car, etc) // shape, form // the press, the newspapers collectively
356 # // formality, convention // formula // a man, a guy, a chap
357 # 'ουσιαστικού' ???, 'διλεκτικό' ???, ουσιαστικό: noun, substantive
358 "κλιτικός τύπος ουσιαστικού (διλεκτικό ουσιαστικό)": {
359 "pos": "noun",
360 "tags": ["form-of"],
361 },
362 # κλιτικός τύπος ουσιαστικού, ουδέτερο, πληθυντικός: 'κλιτικός' ???,
363 # τύπος: sort, type, mould, stamp (of a person character) // model, type
364 # (of car, etc) // shape, form // the press, the newspapers collectively
365 # // formality, convention // formula // a man, a guy, a chap
366 # 'ουσιαστικού' ???, ουδέτερο: neuter ουδέτερο: [ουδέτερος: neuter,
367 # sexless // neutral, non-aligned // the gender: neuter // neutral] //
368 # Accusative masculine singular form of ουδέτερος (oudéteros). //
369 # Nominative, accusative and vocative neuter singular form of ουδέτερος
370 # (oudéteros). πληθυντικός: plural
371 "κλιτικός τύπος ουσιαστικού, ουδέτερο, πληθυντικός": {
372 "pos": "noun",
373 "tags": ["form-of"],
374 },
375 # κλιτικός τύπος ουσιαστικού: 'κλιτικός' ???, τύπος: sort, type,
376 # mould, stamp (of a person character) // model, type (of car, etc) //
377 # shape, form // the press, the newspapers collectively // formality,
378 # convention // formula // a man, a guy, a chap 'ουσιαστικού' ???,
379 "κλιτικός τύπος ουσιαστικού": {"pos": "noun", "tags": ["form-of"]},
380 # κλιτικός τύπος πολυλεκτικού όρου: 'κλιτικός' ???, τύπος: sort,
381 # type, mould, stamp (of a person character) // model, type (of car,
382 # etc) // shape, form // the press, the newspapers collectively //
383 # formality, convention // formula // a man, a guy, a chap
384 # 'πολυλεκτικού' ???, 'όρου' ???,
385 "κλιτικός τύπος πολυλεκτικού όρου": {"pos": "name"},
386 # κορεατικό αλφάβητο: 'κορεατικό' ???, αλφάβητο: alphabet, a series
387 # of letters or graphics representing particular sounds or phonemes //
388 # the ABCs of a subject matter; the basics; the most basic fundamentals
389 # of a certain sphere of knowledge // [αλφάβητος: Rare form of αλφάβητο
390 # (alfávito).] // Accusative singular form of αλφάβητος (alfávitos).
391 "κορεατικό αλφάβητο": {"pos": "character", "tags": ["hangeul"]},
392 # κύριο όνομα: κύριο: [κύριος: mister (title conferred on an adult
393 # male) // master (someone who has control over something or someone) //
394 # sir (an address to any male)] // [κύριος: main, principal, most
395 # important] // Accusative masculine singular form of κύριος (kýrios).
396 # // Nominative, accusative and vocative neuter singular form of κύριος
397 # (kýrios). κύριο: [κύριος: mister (title conferred on an adult male) //
398 # master (someone who has control over something or someone) // sir (an
399 # address to any male)] // [κύριος: main, principal, most important] //
400 # Accusative singular form of κύριος (kýrios). όνομα: name // name,
401 # reputation // noun (sensu lato), a word class including substantives
402 # (nouns, sensu stricto) and adjectives
403 "κύριο όνομα": {"pos": "name"},
404 # μετοχή του βαρυφορτώνω, βαρυφορτώνομαι: μετοχή: participle // share,
405 # stock του: [ο: the definite masculine singular article. the] //
406 # genitive masculine singular of ο (o) (the) // genitive neuter singular
407 # of ο (o) (the) του: him, it // his, its 'βαρυφορτώνω' ???,
408 # 'βαρυφορτώνομαι' ???,
409 "μετοχή του": {
410 "pos": "verb",
411 "tags": ["participle"],
412 },
413 "μετοχή": {"pos": "verb", "tags": ["participle"]},
414 # μετοχικό επίθετο: 'μετοχικό' ???, επίθετο: adjective // surname
415 "μετοχικό επίθετο": {"pos": "adj", "tags": ["possessive"]},
416 # μονολεκτικό ουσιαστικό: 'μονολεκτικό' ???, ουσιαστικό: noun,
417 # substantive
418 "μονολεκτικό ουσιαστικό": {"pos": "noun"},
419 # μόριο (καθαρεύουσα): μόριο: molecule // particle, speck (a very
420 # small piece of matter) // part (of the body) // part (of the body) //
421 # genitalia, parts // particle // point (in an evaluative scale)
422 # καθαρεύουσα: Katharevousa (purist variant of Modern Greek)
423 "μόριο (καθαρεύουσα)": {"pos": "particle", "tags": ["Katharevousa"]},
424 # μόριο: μόριο: molecule // particle, speck (a very small piece of
425 # matter) // part (of the body) // part (of the body) // genitalia,
426 # parts // particle // point (in an evaluative scale)
427 "μόριο": {"pos": "particle"},
428 # ουσιαστικό (καθαρεύουσα): ουσιαστικό: noun, substantive καθαρεύουσα:
429 # Katharevousa (purist variant of Modern Greek)
430 "ουσιαστικό (καθαρεύουσα)": {"pos": "noun", "tags": ["Katharevousa"]},
431 # ουσιαστικό - επίθετο: ουσιαστικό: noun, substantive '' ???,
432 # επίθετο: adjective // surname
433 "ουσιαστικό - επίθετο": {"pos": "noun", "tags": ["adjective", "noun"]},
434 # ουσιαστικό - επιφώνημα: ουσιαστικό: noun, substantive '' ???,
435 # επιφώνημα: interjection, exclamation
436 "ουσιαστικό - επιφώνημα": {"pos": "noun", "tags": ["interjection", "noun"]},
437 # ουσιαστικό - κύριο όνομα: ουσιαστικό: noun, substantive '' ???,
438 # κύριο: [κύριος: mister (title conferred on an adult male) // master
439 # (someone who has control over something or someone) // sir (an address
440 # to any male)] // [κύριος: main, principal, most important] //
441 # Accusative masculine singular form of κύριος (kýrios). // Nominative,
442 # accusative and vocative neuter singular form of κύριος (kýrios).
443 # κύριο: [κύριος: mister (title conferred on an adult male) // master
444 # (someone who has control over something or someone) // sir (an address
445 # to any male)] // [κύριος: main, principal, most important] //
446 # Accusative singular form of κύριος (kýrios). όνομα: name // name,
447 # reputation // noun (sensu lato), a word class including substantives
448 # (nouns, sensu stricto) and adjectives
449 "ουσιαστικό - κύριο όνομα": {"pos": "name"},
450 # ουσιαστικό - πολυλεκτικός όρος: ουσιαστικό: noun, substantive ''
451 # ???, πολυλεκτικός: polylectic όρος: term (word, phrase; limitation,
452 # restriction) // definition, stipulation // clause // article όρος:
453 # mount, mountain
454 "ουσιαστικό - πολυλεκτικός όρος": {"pos": "noun"},
455 # ουσιαστικό /ˈkɒndʌkt/: ουσιαστικό: noun, substantive '/ˈkɒndʌkt/'
456 # ???,
457 "ουσιαστικό": {"pos": "noun"},
458 # ουσιαστικό αρσενικό: ουσιαστικό: noun, substantive αρσενικό:
459 # [αρσενικός: masculine] // inflection of αρσενικός (arsenikós): //
460 # masculine accusative singular // inflection of αρσενικός (arsenikós):
461 # // neuter nominative/accusative/vocative singular αρσενικό: arsenic
462 "ουσιαστικό αρσενικό": {"pos": "noun", "tags": ["masculine"]},
463 # ουσιαστικό επίρρημα: ουσιαστικό: noun, substantive επίρρημα: adverb
464 # (lexical category)
465 "ουσιαστικό επίρρημα": {"pos": "adv", "tags": ["adverb", "noun"]},
466 # ουσιαστικό θηλυκό: ουσιαστικό: noun, substantive θηλυκό: woman,
467 # female θηλυκό: [θηλυκός: female (feminine gender) // feminine (female
468 # person or animal)] // Accusative masculine singular form of θηλυκός
469 # (thilykós). // Nominative, accusative and vocative neuter singular
470 # form of θηλυκός (thilykós).
471 "ουσιαστικό θηλυκό": {"pos": "noun", "tags": ["feminine"]},
472 # ουσιαστικό και επίθετο: ουσιαστικό: noun, substantive και: and //
473 # also // plus, and // past (time) επίθετο: adjective // surname
474 "ουσιαστικό και επίθετο": {"pos": "noun", "tags": ["adjective", "noun"]},
475 # ουσιαστικό και επιφώνημα: ουσιαστικό: noun, substantive και: and //
476 # also // plus, and // past (time) επιφώνημα: interjection, exclamation
477 "ουσιαστικό και επιφώνημα": {
478 "pos": "noun",
479 "tags": ["interjection", "noun"],
480 },
481 # ουσιαστικό και κλιτικός τύπος ουσιαστικού: ουσιαστικό: noun,
482 # substantive και: and // also // plus, and // past (time) 'κλιτικός'
483 # ???, τύπος: sort, type, mould, stamp (of a person character) //
484 # model, type (of car, etc) // shape, form // the press, the newspapers
485 # collectively // formality, convention // formula // a man, a guy, a
486 # chap 'ουσιαστικού' ???,
487 "ουσιαστικό και κλιτικός τύπος ουσιαστικού": {"pos": "noun"},
488 # ουσιαστικό και κύριο όνομα: ουσιαστικό: noun, substantive και: and
489 # // also // plus, and // past (time) κύριο: [κύριος: mister (title
490 # conferred on an adult male) // master (someone who has control over
491 # something or someone) // sir (an address to any male)] // [κύριος:
492 # main, principal, most important] // Accusative masculine singular form
493 # of κύριος (kýrios). // Nominative, accusative and vocative neuter
494 # singular form of κύριος (kýrios). κύριο: [κύριος: mister (title
495 # conferred on an adult male) // master (someone who has control over
496 # something or someone) // sir (an address to any male)] // [κύριος:
497 # main, principal, most important] // Accusative singular form of κύριος
498 # (kýrios). όνομα: name // name, reputation // noun (sensu lato), a word
499 # class including substantives (nouns, sensu stricto) and adjectives
500 "ουσιαστικό και κύριο όνομα": {
501 "pos": "noun",
502 "tags": ["proper-noun", "noun"],
503 },
504 # ουσιαστικό, επίθετο: ουσιαστικό: noun, substantive επίθετο:
505 # adjective // surname
506 "ουσιαστικό, επίθετο": {"pos": "noun", "tags": ["adjective", "noun"]},
507 # ουσιαστικό, πολυλεκτικός όρος: ουσιαστικό: noun, substantive
508 # πολυλεκτικός: polylectic όρος: term (word, phrase; limitation,
509 # restriction) // definition, stipulation // clause // article όρος:
510 # mount, mountain
511 "ουσιαστικό, πολυλεκτικός όρος": {"pos": "noun"},
512 # ουσιαστικό, ρήμα: ουσιαστικό: noun, substantive ρήμα: verb
513 "ουσιαστικό, ρήμα": {"pos": "noun", "tags": ["noun", "verb"]},
514 # πoλυλεκτικό ουσιαστικό: 'πoλυλεκτικό' ???, ουσιαστικό: noun,
515 # substantive
516 "πoλυλεκτικό ουσιαστικό": {"pos": "noun"},
517 # παθητική μετοχή του μυώ: 'παθητική' ???, μετοχή: participle //
518 # share, stock του: [ο: the definite masculine singular article. the] //
519 # genitive masculine singular of ο (o) (the) // genitive neuter singular
520 # of ο (o) (the) του: him, it // his, its 'μυώ' ???,
521 "παθητική μετοχή του": {"pos": "verb", "tags": ["participle", "passive"]},
522 # παροιμία - έκφραση: παροιμία: proverb, saying, adage, maxim (phrase
523 # expressing a basic truth) '' ???, έκφραση: expression
524 "παροιμία - έκφραση": {"pos": "phrase", "tags": ["idiomatic"]},
525 # παροιμία: παροιμία: proverb, saying, adage, maxim (phrase expressing
526 # a basic truth)
527 "παροιμία": {"pos": "phrase", "tags": ["idiomatic"]},
528 # περιφραστικό ουσιαστικό: 'περιφραστικό' ???, ουσιαστικό: noun,
529 # substantive
530 "περιφραστικό ουσιαστικό": {"pos": "noun"},
531 # πολυλεκτικό επίθετο: 'πολυλεκτικό' ???, επίθετο: adjective //
532 # surname
533 "πολυλεκτικό επίθετο": {"pos": "adj"},
534 # πολυλεκτικό επίρρημα: 'πολυλεκτικό' ???, επίρρημα: adverb (lexical
535 # category)
536 "πολυλεκτικό επίρρημα": {"pos": "adv"},
537 # πολυλεκτικό ουσιαστικό: 'πολυλεκτικό' ???, ουσιαστικό: noun,
538 # substantive
539 "πολυλεκτικό ουσιαστικό": {"pos": "noun"},
540 # πολυλεκτικός όρος επίθετο: πολυλεκτικός: polylectic όρος: term
541 # (word, phrase; limitation, restriction) // definition, stipulation //
542 # clause // article όρος: mount, mountain επίθετο: adjective // surname
543 "πολυλεκτικός όρος επίθετο": {"pos": "adj"},
544 # πολυλεκτικός όρος ουσιαστικό: πολυλεκτικός: polylectic όρος: term
545 # (word, phrase; limitation, restriction) // definition, stipulation //
546 # clause // article όρος: mount, mountain ουσιαστικό: noun, substantive
547 "πολυλεκτικός όρος ουσιαστικό": {"pos": "noun"},
548 # πολυλεκτικός όρος: πολυλεκτικός: polylectic όρος: term (word,
549 # phrase; limitation, restriction) // definition, stipulation // clause
550 # // article όρος: mount, mountain
551 "πολυλεκτικός όρος": {"pos": "noun"},
552 # προσδιοριστής: 'προσδιοριστής' ???,
553 "προσδιοριστής": {"pos": "det"},
554 # πρόθεση: πρόθεση: preposition // intent, intention, purpose πρόθεση:
555 # prosthesis (an artificial replacement for a body part) // prosthetic
556 "πρόθεση": {"pos": "prep"},
557 # πρόθημα: πρόθημα: prefix
558 "πρόθημα": {"pos": "prefix"},
559 # πρόσφυμα: πρόσφυμα: affix
560 "πρόσφυμα": {"pos": "affix"},
561 # ρήμα - επιφώνημα: ρήμα: verb '' ???, επιφώνημα: interjection,
562 # exclamation
563 "ρήμα - επιφώνημα": {"pos": "verb", "tags": ["interjection", "verb"]},
564 # ρήμα μεταβατικό: ρήμα: verb μεταβατικό: [μεταβατικός: transitive //
565 # transition // transitional] // Accusative masculine singular form of
566 # μεταβατικός (metavatikós). // Nominative, accusative and vocative
567 # neuter singular form of μεταβατικός (metavatikós).
568 "ρήμα μεταβατικό": {"pos": "verb", "tags": ["transitive"]},
569 # ρήμα, αόριστος: ρήμα: verb αόριστος: vague // indefinite //
570 # preterite αόριστος: aorist, past tense, simple past, perfective past
571 "ρήμα, αόριστος": {"pos": "verb", "tags": ["aorist"]},
572 # ρήμα, μόριο, ουσιαστικό: ρήμα: verb μόριο: molecule // particle,
573 # speck (a very small piece of matter) // part (of the body) // part (of
574 # the body) // genitalia, parts // particle // point (in an evaluative
575 # scale) ουσιαστικό: noun, substantive
576 "ρήμα, μόριο, ουσιαστικό": {
577 "pos": "verb",
578 "tags": ["particle", "noun", "verb"],
579 },
580 # ρήμα, ουσιαστικό: ρήμα: verb ουσιαστικό: noun, substantive
581 "ρήμα, ουσιαστικό": {"pos": "verb", "tags": ["noun", "verb"]},
582 # ρήμα: ρήμα: verb
583 "ρήμα": {"pos": "verb"},
584 # ρίζα: ρίζα: root (of a plant) // root // root
585 "ρίζα": {"pos": "root", "tags": ["morpheme"]},
586 # ρηματική έκφραση: 'ρηματική' ???, έκφραση: expression
587 "ρηματική έκφραση": {"pos": "verb"},
588 # σουπίνο: 'σουπίνο' ???,
589 "σουπίνο": {"pos": "verb", "tags": ["supine"]},
590 # συντομομορφή - ουσιαστικό: συντομομορφή: abbreviation: initialism,
591 # acronym, etc '' ???, ουσιαστικό: noun, substantive
592 "συντομομορφή - ουσιαστικό": {
593 "pos": "abbrev",
594 "tags": ["noun", "abbreviation"],
595 },
596 # συντομομορφή, αρκτικόλεξο: συντομομορφή: abbreviation: initialism,
597 # acronym, etc αρκτικόλεξο: initialism
598 "συντομομορφή, αρκτικόλεξο": {"pos": "abbrev", "tags": ["initialism"]},
599 # συντομομορφή: συντομομορφή: abbreviation: initialism, acronym, etc
600 "συντομομορφή": {"pos": "abbrev"},
601 # σχήμα του ρήματος board: σχήμα: figure, shape του: [ο: the definite
602 # masculine singular article. the] // genitive masculine singular of ο
603 # (o) (the) // genitive neuter singular of ο (o) (the) του: him, it //
604 # his, its ρήματος: [ρήμα: verb] // Genitive singular form of ρήμα
605 # (ríma). 'board' ???,
606 "σχήμα του ρήματος": {"pos": "verb", "tags": ["form-of"]},
607 # σύμβολο: σύμβολο: symbol, character, glyph
608 "σύμβολο": {"pos": "symbol"},
609 # σύνδεσμος (καθαρεύουσα): σύνδεσμος: conjunction // ligament // HTML
610 # link // union, relationship, contact καθαρεύουσα: Katharevousa (purist
611 # variant of Modern Greek)
612 "σύνδεσμος (καθαρεύουσα)": {"pos": "conj", "tags": ["Katharevousa"]},
613 # σύνδεσμος: σύνδεσμος: conjunction // ligament // HTML link // union,
614 # relationship, contact
615 "σύνδεσμος": {"pos": "conj"},
616 # σύνθετο επίθετο: 'σύνθετο' ???, επίθετο: adjective // surname
617 "σύνθετο επίθετο": {"pos": "adj"},
618 # σύνθετο επίρρημα, έκφραση: 'σύνθετο' ???, επίρρημα: adverb (lexical
619 # category) έκφραση: expression
620 "σύνθετο επίρρημα, έκφραση": {"pos": "adv"},
621 # σύνθετο ουσιαστικό: 'σύνθετο' ???, ουσιαστικό: noun, substantive
622 "σύνθετο ουσιαστικό": {"pos": "noun"},
623 # φράση: φράση: phrase, expression
624 "φράση": {"pos": "phrase"},
625 # χαρακτήρας: χαρακτήρας: character (the qualities which identify a
626 # person) // character (a person's behaviours which identify them) //
627 # character, letter, symbol
628 "χαρακτήρας": {"pos": "symbol"},
629 "ρηματικός τύπος": {"pos": "verb"},
630 # Japanese translitteration entries
631 "μεταγραφή": {"pos": "romanization"},
632 "συγχώνευση": {"pos": "contraction"},
633 "μορφή σύνθετου όρου": {"pos": "contraction"},
634}
636POS_HEADINGS_RE = re.compile(
637 r"("
638 + r"|".join(
639 re.escape(s) for s in sorted(POS_HEADINGS.keys(), key=len, reverse=True)
640 )
641 + r")(.*)"
642)
645SubSectionMap = TypedDict(
646 "SubSectionMap",
647 {
648 # TODO: Use Typing.Required (3.11>=) when python 3.10 support drops
649 "type": Heading,
650 # "debug" is legacy from [en], might be implemented
651 "debug": str,
652 "tags": Tags,
653 },
654 total=False,
655)
658SUBSECTION_HEADINGS: dict[str, SubSectionMap] = {
659 "etymology": {"type": Heading.Etym},
660 "ετυμολογία": {"type": Heading.Etym},
661 "πηγές": {"type": Heading.Ignored}, # Not etymology, but literary sources
662 "pronunciation": {"type": Heading.Pron},
663 "προφορά": {"type": Heading.Pron},
664 "αναλυτική κλίση": {"type": Heading.Infl},
665 "κλίση": {"type": Heading.Infl},
666 "references": {"type": Heading.Ref},
667 "αναφορές": {"type": Heading.Ref},
668 "άλλες γραφές": {"type": Heading.Transliterations},
669 "άλλες μορφές": {"type": Heading.Related},
670 "ανεπίσημα": {"type": Heading.Related},
671 "συγγενικά": {"type": Heading.Related},
672 "πολυλεκτικοί όροι": {"type": Heading.Related},
673 "συγγενείς": {"type": Heading.Related},
674 # Homonyms
675 "ομώνυμα / ομόηχα": {"type": Heading.Homonyms},
676 "συνώνυμα": {"type": Heading.Synonyms},
677 # Partial synonyms
678 "μερική συνωνυμία": {"type": Heading.Synonyms},
679 # Exact synonym
680 "ταυτόσημο": {"type": Heading.Synonyms},
681 "ταυτόσημα": {"type": Heading.Synonyms},
682 "εκφράσεις": {"type": Heading.Related, "tags": ["idiomatic"]},
683 "σύνθετα": {"type": Heading.Related, "tags": ["compound"]},
684 "μεταγραφές": {"type": Heading.Transliterations},
685 # Related words in foreign languages
686 "παράγωγα": {"type": Heading.Derived},
687 # Derived words
688 "απόγονοι": {"type": Heading.Derived},
689 "υποκοριστικά": {"type": Heading.Derived, "tags": ["diminutive"]},
690 # Anagrams
691 "αλλόγλωσσα παράγωγα": {"type": Heading.Translations},
692 "μεταφράσεις": {"type": Heading.Translations},
693 "αναγραμματισμοί": {"type": Heading.Ignored},
694 # "misspelling" as POS
695 "ανορθογραφία": {"type": Heading.Ignored},
696 # see also
697 "δείτε επίσης": {"type": Heading.Ignored},
698 # Antonyms
699 "αντώνυμα": {"type": Heading.Antonyms},
700 "αντώνυμη έκφραση": {"type": Heading.Antonyms},
701 "αρχικοί χρόνοι": {"type": Heading.Notes},
702 "σημειώσεις": {"type": Heading.Notes},
703 "υποσημειώσεις": {"type": Heading.Notes},
704 # 'answers' to a phrasebook question: see τι κάνεις
705 "απαντήσεις": {"type": Heading.Ignored},
706 # Proverbs
707 "παροιμίες": {"type": Heading.Ignored},
708 # External links
709 "εξωτερικοί σύνδεσμοι": {"type": Heading.Ignored},
710 # "": {"type": Heading.Err},
711}
713SUBSECTIONS_RE = re.compile(
714 r"([ =]*"
715 + r"|".join(
716 re.escape(s)
717 for s in sorted(SUBSECTION_HEADINGS.keys(), key=len, reverse=True)
718 )
719 + r")(.*)[ =]*"
720)