Coverage for src / wiktextract / extractor / el / section_titles.py: 100%

30 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2025-12-12 08:09 +0000

1# https://simple.wiktionary.org/wiki/Category:Part_of_speech_templates 

2import re 

3from enum import Enum, auto 

4from typing import Literal, TypedDict 

5 

6 

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 AltOf = auto() 

16 FormOf = auto() 

17 Transliterations = auto() 

18 Synonyms = auto() 

19 Homonyms = auto() 

20 Antonyms = auto() 

21 Translations = auto() 

22 Derived = auto() 

23 Ref = auto() 

24 Notes = auto() 

25 

26 

27Tags = list[str] 

28POSName = Literal[ 

29 "", # Used as default 

30 "ERROR_UNKNOWN_POS", 

31 "abbrev", 

32 "adj", 

33 "adv", 

34 "adv_phrase", 

35 "affix", 

36 "article", 

37 "character", 

38 "conj", 

39 "contraction", 

40 "det", 

41 "infix", 

42 "intj", 

43 "name", 

44 "noun", 

45 "num", 

46 "particle", 

47 "phrase", 

48 "prefix", 

49 "prep", 

50 "pron", # pronoun 

51 "romanization", 

52 "root", 

53 "suffix", 

54 "symbol", 

55 "verb", 

56] 

57"""Greek subset of the English PARTS_OF_SPEECH.""" 

58POSMap = TypedDict( 

59 "POSMap", 

60 { 

61 # TODO: Use Typing.Required (3.11>=) when python 3.10 support drops 

62 "pos": POSName, 

63 # "debug" is legacy from [en], might be implemented 

64 "debug": str, 

65 "tags": Tags, 

66 }, 

67 total=False, 

68) 

69 

70# Main entries for different kinds of POS headings; no aliases 

71# XXX translate these 

72POS_HEADINGS: dict[str, POSMap] = { 

73 # "": {"pos": "", "tags": [""], 

74 # άρθρο: article // article // article of a charter, law, contract etc. 

75 # // limb 

76 "άρθρο": {"pos": "article"}, 

77 # έκφραση - πολυλεκτικός όρος: έκφραση: expression '' ???, 

78 # πολυλεκτικός: polylectic όρος: term (word, phrase; limitation, 

79 # restriction) // definition, stipulation // clause // article όρος: 

80 # mount, mountain 

81 "έκφραση - πολυλεκτικός όρος": {"pos": "phrase"}, 

82 # έκφραση και επίρρημα (επιρρηματική έκφραση): έκφραση: expression 

83 # και: and // also // plus, and // past (time) επίρρημα: adverb (lexical 

84 # category) επιρρηματική: [επιρρηματικός: adverbial, relating to an 

85 # adverb] // Nominative feminine singular form of επιρρηματικός 

86 # (epirrimatikós). // Accusative feminine singular form of επιρρηματικός 

87 # (epirrimatikós). // Vocative feminine singular form of επιρρηματικός 

88 # (epirrimatikós). έκφραση: expression 

89 "έκφραση και επίρρημα (επιρρηματική έκφραση)": {"pos": "adv_phrase"}, 

90 # έκφραση του bask: έκφραση: expression του: [ο: the definite 

91 # masculine singular article. the] // genitive masculine singular of ο 

92 # (o) (the) // genitive neuter singular of ο (o) (the) του: him, it // 

93 # his, its 'bask' ???, 

94 ## "bask in something" 

95 ## "EXPRESSING 'BASK'" -> phrases? 

96 ## No special handling 

97 "έκφραση του": {"pos": "phrase"}, 

98 # έκφραση: expression 

99 "έκφραση": {"pos": "phrase"}, 

100 # ένθημα: ένθημα: infix, interfix 

101 "ένθημα": {"pos": "infix"}, 

102 # αμετάβατο ρήμα: αμετάβατο: [αμετάβατος: intransitive] // Accusative 

103 # masculine singular form of αμετάβατος (ametávatos). // Nominative, 

104 # accusative and vocative neuter singular form of αμετάβατος 

105 # (ametávatos). ρήμα: verb 

106 "αμετάβατο ρήμα": {"pos": "verb", "tags": ["intransitive"]}, 

107 "απαρέμφατο": {"pos": "verb", "tags": ["infinitive"]}, 

108 # αντωνυμία: αντωνυμία: pronoun // antonymy 

109 "αντωνυμία": {"pos": "pron"}, 

110 # αριθμητικό: αριθμητικό: numeral αριθμητικό: [αριθμητικός: 

111 # arithmetical, numerical] // Accusative masculine singular form of 

112 # αριθμητικός (arithmitikós). // Nominative, accusative and vocative 

113 # neuter singular form of αριθμητικός (arithmitikós). 

114 "αριθμητικό": {"pos": "num"}, 

115 # βαθμός επιθέτου: βαθμός: grade (of job, exams, position in 

116 # employment) // rank // degree (unit of temperature) // (plural) marks, 

117 # grades // degree (severity of burns) // degree (of an adjective) 

118 # επιθέτου: [επίθετο: adjective // surname] // genitive singular of 

119 # επίθετο (epítheto) 

120 "βαθμός επιθέτου": {"pos": "adj", "tags": ["comparative"]}, 

121 # βιβλίο φράσεων: βιβλίο: book 'φράσεων' ???, 

122 "βιβλίο φράσεων": {"pos": "phrase"}, 

123 # γερουνδιακό: 'γερουνδιακό' ???, 

124 "γερουνδιακό": {"pos": "verb", "tags": ["participle", "gerund"]}, 

125 # γερούνδιο: γερούνδιο: gerund 

126 "γερούνδιο": {"pos": "verb", "tags": ["participle", "gerund"]}, 

127 # γνωμικά: 'γνωμικά' ???, 

128 "γνωμικά": {"pos": "phrase"}, 

129 # γραμματικό στοιχείο: γραμματικό: [γραμματικός: grammatical (relating 

130 # to grammar) // grammatical (using correct grammar)] // [γραμματικός: 

131 # grammarian // scribe, secretary] // Accusative masculine singular form 

132 # of γραμματικός (grammatikós). // Nominative, accusative and vocative 

133 # neuter singular form of γραμματικός (grammatikós). γραμματικό: 

134 # [γραμματικός: grammatical (relating to grammar) // grammatical (using 

135 # correct grammar)] // [γραμματικός: grammarian // scribe, secretary] // 

136 # Accusative singular form of γραμματικός (grammatikós). στοιχείο: unit, 

137 # element, cell (a portion of a whole) // element // unit, element, cell 

138 # (a portion of a whole) // item of data, piece of information // unit, 

139 # element, cell (a portion of a whole) // letter, piece of type // unit, 

140 # element, cell (a portion of a whole) // cell, battery // unit, 

141 # element, cell (a portion of a whole) // subset of a population 

142 "γραμματικό στοιχείο": {"pos": "particle"}, 

143 # διλεκτικό ουσιαστικό: 'διλεκτικό' ???, ουσιαστικό: noun, 

144 # substantive 

145 # two-word noun 

146 "διλεκτικό ουσιαστικό": {"pos": "noun"}, 

147 # επίθετο - έκφραση: επίθετο: adjective // surname '' ???, έκφραση: 

148 # expression 

149 "επίθετο - έκφραση": {"pos": "adj"}, 

150 # επίθετο - ουσιαστικό: επίθετο: adjective // surname '' ???, 

151 # ουσιαστικό: noun, substantive 

152 "επίθετο - ουσιαστικό": {"pos": "adj"}, 

153 # επίθετο ή ουσιαστικό: επίθετο: adjective // surname ή: or // either 

154 # … or ουσιαστικό: noun, substantive 

155 "επίθετο ή ουσιαστικό": {"pos": "adj", "tags": ["adjective", "noun"]}, 

156 # επίθετο και επίρρημα: επίθετο: adjective // surname και: and // also 

157 # // plus, and // past (time) επίρρημα: adverb (lexical category) 

158 "επίθετο και επίρρημα": {"pos": "adj", "tags": ["adjective", "adverb"]}, 

159 # επίθετο και ουσιαστικό: επίθετο: adjective // surname και: and // 

160 # also // plus, and // past (time) ουσιαστικό: noun, substantive 

161 "επίθετο και ουσιαστικό": {"pos": "adj", "tags": ["adjective", "noun"]}, 

162 # επίθετο, επιφώνημα, επίρρημα: επίθετο: adjective // surname 

163 # επιφώνημα: interjection, exclamation επίρρημα: adverb (lexical 

164 # category) 

165 "επίθετο, επιφώνημα, επίρρημα": {"pos": "adj"}, 

166 # επίθετο, ουσιαστικό, ρήμα: επίθετο: adjective // surname ουσιαστικό: 

167 # noun, substantive ρήμα: verb 

168 "επίθετο, ουσιαστικό, ρήμα": {"pos": "adj"}, 

169 # επίθετο, ουσιαστικό: επίθετο: adjective // surname ουσιαστικό: noun, 

170 # substantive 

171 "επίθετο, ουσιαστικό": {"pos": "adj"}, 

172 # επίθετο: επίθετο: adjective // surname 

173 "επίθετο": {"pos": "adj"}, 

174 # επίθημα για το σχηματισμό ουδέτερων ουσιαστικών: επίθημα: suffix 

175 # για: for // for // for, by // for // about το: [ο: the definite 

176 # masculine singular article. the] // nominative neuter singular of ο 

177 # (o) (the) // accusative neuter singular of ο (o) (the) το: it (3rd 

178 # person neuter singular, nominative) // it (3rd person neuter singular, 

179 # accusative) 'σχηματισμό' ???, ουδέτερων: [ουδέτερος: neuter, sexless 

180 # // neutral, non-aligned // the gender: neuter // neutral] // Genitive 

181 # masculine plural form of ουδέτερος (oudéteros). // Genitive feminine 

182 # plural form of ουδέτερος (oudéteros). // Genitive neuter plural form 

183 # of ουδέτερος (oudéteros). 'ουσιαστικών' ???, 

184 "επίθημα για το σχηματισμό ουδέτερων ουσιαστικών": {"pos": "suffix"}, 

185 # επίθημα: επίθημα: suffix 

186 "επίθημα": {"pos": "suffix"}, 

187 # επίρρημα - επιφώνημα: επίρρημα: adverb (lexical category) '' ???, 

188 # επιφώνημα: interjection, exclamation 

189 "επίρρημα - επιφώνημα": {"pos": "adv_phrase"}, 

190 # επίρρημα, επίθετο: επίρρημα: adverb (lexical category) επίθετο: 

191 # adjective // surname 

192 "επίρρημα, επίθετο": {"pos": "adv"}, 

193 # επίρρημα, κλιτικός τύπος επιθέτου: επίρρημα: adverb (lexical 

194 # category) 'κλιτικός' ???, τύπος: sort, type, mould, stamp (of a 

195 # person character) // model, type (of car, etc) // shape, form // the 

196 # press, the newspapers collectively // formality, convention // formula 

197 # // a man, a guy, a chap επιθέτου: [επίθετο: adjective // surname] // 

198 # genitive singular of επίθετο (epítheto) 

199 "επίρρημα, κλιτικός τύπος επιθέτου": {"pos": "adv"}, 

200 # επίρρημα, ουσιαστικό: επίρρημα: adverb (lexical category) 

201 # ουσιαστικό: noun, substantive 

202 "επίρρημα, ουσιαστικό": {"pos": "adv"}, 

203 # επίρρημα: επίρρημα: adverb (lexical category) 

204 "επίρρημα": {"pos": "adv"}, 

205 # επιθετικό συνθετικό: 'επιθετικό' ???, συνθετικό: combining form 

206 # συνθετικό: [συνθετικός: synthetic // composite, component] // 

207 # Accusative masculine singular form of συνθετικός (synthetikós). // 

208 # Nominative, accusative and vocative neuter singular form of συνθετικός 

209 # (synthetikós). 

210 "επιθετικό συνθετικό": {"pos": "adj"}, 

211 # επιρρηματική έκφραση: επιρρηματική: [επιρρηματικός: adverbial, 

212 # relating to an adverb] // Nominative feminine singular form of 

213 # επιρρηματικός (epirrimatikós). // Accusative feminine singular form of 

214 # επιρρηματικός (epirrimatikós). // Vocative feminine singular form of 

215 # επιρρηματικός (epirrimatikós). έκφραση: expression 

216 "επιρρηματική έκφραση": {"pos": "adv_phrase"}, 

217 # επιφώνημα - ουσιαστικό: επιφώνημα: interjection, exclamation '' ???, 

218 # ουσιαστικό: noun, substantive 

219 "επιφώνημα - ουσιαστικό": {"pos": "intj"}, 

220 # επιφώνημα και ουσιαστικό: επιφώνημα: interjection, exclamation και: 

221 # and // also // plus, and // past (time) ουσιαστικό: noun, substantive 

222 "επιφώνημα και ουσιαστικό": {"pos": "intj"}, 

223 # επιφώνημα: επιφώνημα: interjection, exclamation 

224 "επιφώνημα": {"pos": "intj"}, 

225 # θηλυκό: θηλυκό: woman, female θηλυκό: [θηλυκός: female (feminine 

226 # gender) // feminine (female person or animal)] // Accusative masculine 

227 # singular form of θηλυκός (thilykós). // Nominative, accusative and 

228 # vocative neuter singular form of θηλυκός (thilykós). 

229 "θηλυκό": {"pos": "noun", "tags": ["feminine"]}, 

230 # κάντζι: 'κάντζι' ???, 

231 "κάντζι": {"pos": "character", "tags": ["kanji"]}, 

232 # κατάληξη αρσενικών επιθέτων: κατάληξη: ending, termination // result 

233 # or outcome // ending, suffix αρσενικών: [αρσενικός: masculine] // 

234 # Genitive masculine plural form of αρσενικός (arsenikós). // Genitive 

235 # feminine plural form of αρσενικός (arsenikós). // Genitive neuter 

236 # plural form of αρσενικός (arsenikós). επιθέτων: [επίθετο: adjective // 

237 # surname] // genitive plural of επίθετο (epítheto) 

238 "κατάληξη αρσενικών επιθέτων": { 

239 "pos": "suffix", 

240 "tags": ["masculine", "adjective"], 

241 }, 

242 # κατάληξη αρσενικών ουσιαστικών: κατάληξη: ending, termination // 

243 # result or outcome // ending, suffix αρσενικών: [αρσενικός: masculine] 

244 # // Genitive masculine plural form of αρσενικός (arsenikós). // 

245 # Genitive feminine plural form of αρσενικός (arsenikós). // Genitive 

246 # neuter plural form of αρσενικός (arsenikós). 'ουσιαστικών' ???, 

247 "κατάληξη αρσενικών ουσιαστικών": { 

248 "pos": "suffix", 

249 "tags": ["masculine", "noun"], 

250 }, 

251 # κατάληξη επιρρημάτων: κατάληξη: ending, termination // result or 

252 # outcome // ending, suffix επιρρημάτων: [επίρρημα: adverb (lexical 

253 # category)] // Genitive plural form of επίρρημα (epírrima). 

254 "κατάληξη επιρρημάτων": {"pos": "suffix", "tags": ["adverbial"]}, 

255 # κατάληξη θηλυκών ουσιαστικών: κατάληξη: ending, termination // 

256 # result or outcome // ending, suffix θηλυκών: [θηλυκός: female 

257 # (feminine gender) // feminine (female person or animal)] // Genitive 

258 # masculine plural form of θηλυκός (thilykós). // Genitive feminine 

259 # plural form of θηλυκός (thilykós). // Genitive neuter plural form of 

260 # θηλυκός (thilykós). θηλυκών: [θηλυκό: woman, female] // [θηλυκό: 

261 # [θηλυκός: female (feminine gender) // feminine (female person or 

262 # animal)] // Accusative masculine singular form of θηλυκός (thilykós). 

263 # // Nominative, accusative and vocative neuter singular form of θηλυκός 

264 # (thilykós).] // Genitive plural form of θηλυκό (thilykó). 

265 # 'ουσιαστικών' ???, 

266 "κατάληξη θηλυκών ουσιαστικών": { 

267 "pos": "suffix", 

268 "tags": ["feminine", "noun"], 

269 }, 

270 # κατάληξη ουδέτερων ουσιαστικών: κατάληξη: ending, termination // 

271 # result or outcome // ending, suffix ουδέτερων: [ουδέτερος: neuter, 

272 # sexless // neutral, non-aligned // the gender: neuter // neutral] // 

273 # Genitive masculine plural form of ουδέτερος (oudéteros). // Genitive 

274 # feminine plural form of ουδέτερος (oudéteros). // Genitive neuter 

275 # plural form of ουδέτερος (oudéteros). 'ουσιαστικών' ???, 

276 "κατάληξη ουδέτερων ουσιαστικών": { 

277 "pos": "suffix", 

278 "tags": ["neuter", "noun"], 

279 }, 

280 # κατάληξη ρημάτων: κατάληξη: ending, termination // result or outcome 

281 # // ending, suffix ρημάτων: [ρήμα: verb] // Genitive plural form of 

282 # ρήμα (ríma). 

283 "κατάληξη ρημάτων": {"pos": "suffix", "tags": ["verb"]}, 

284 # κατάληξη: κατάληξη: ending, termination // result or outcome // 

285 # ending, suffix 

286 "κατάληξη": {"pos": "suffix"}, 

287 # κλιτικός τύπος άρθρου: 'κλιτικός' ???, τύπος: sort, type, mould, 

288 # stamp (of a person character) // model, type (of car, etc) // shape, 

289 # form // the press, the newspapers collectively // formality, 

290 # convention // formula // a man, a guy, a chap άρθρου: [άρθρο: article 

291 # // article // article of a charter, law, contract etc. // limb] // 

292 # Genitive singular form of άρθρο (árthro). 

293 "κλιτικός τύπος άρθρου": {"pos": "article", "tags": ["form-of"]}, 

294 # κλιτικός τύπος αντωνυμίας: 'κλιτικός' ???, τύπος: sort, type, 

295 # mould, stamp (of a person character) // model, type (of car, etc) // 

296 # shape, form // the press, the newspapers collectively // formality, 

297 # convention // formula // a man, a guy, a chap αντωνυμίας: [αντωνυμία: 

298 # pronoun // antonymy] // Genitive singular form of αντωνυμία 

299 # (antonymía). 

300 "κλιτικός τύπος αντωνυμίας": {"pos": "pron", "tags": ["form-of"]}, 

301 # κλιτικός τύπος αριθμητικού: 'κλιτικός' ???, τύπος: sort, type, 

302 # mould, stamp (of a person character) // model, type (of car, etc) // 

303 # shape, form // the press, the newspapers collectively // formality, 

304 # convention // formula // a man, a guy, a chap αριθμητικού: 

305 # [αριθμητικός: arithmetical, numerical] // Genitive masculine and 

306 # neuter singular form of αριθμητικός (arithmitikós). αριθμητικού: 

307 # [αριθμητικό: numeral] // [αριθμητικό: [αριθμητικός: arithmetical, 

308 # numerical] // Accusative masculine singular form of αριθμητικός 

309 # (arithmitikós). // Nominative, accusative and vocative neuter singular 

310 # form of αριθμητικός (arithmitikós).] // Genitive singular form of 

311 # αριθμητικό (arithmitikó). 

312 "κλιτικός τύπος αριθμητικού": {"pos": "num", "tags": ["form-of"]}, 

313 # κλιτικός τύπος γερουνδιακού: 'κλιτικός' ???, τύπος: sort, type, 

314 # mould, stamp (of a person character) // model, type (of car, etc) // 

315 # shape, form // the press, the newspapers collectively // formality, 

316 # convention // formula // a man, a guy, a chap 'γερουνδιακού' ???, 

317 "κλιτικός τύπος γερουνδιακού": { 

318 "pos": "verb", 

319 "tags": ["participle", "gerund", "form-of"], 

320 }, 

321 # κλιτικός τύπος επιθέτου: 'κλιτικός' ???, τύπος: sort, type, mould, 

322 # stamp (of a person character) // model, type (of car, etc) // shape, 

323 # form // the press, the newspapers collectively // formality, 

324 # convention // formula // a man, a guy, a chap επιθέτου: [επίθετο: 

325 # adjective // surname] // genitive singular of επίθετο (epítheto) 

326 "κλιτικός τύπος επιθέτου": {"pos": "adj", "tags": ["form-of"]}, 

327 "κλιτικός τύπος επιθήματος": {"pos": "suffix"}, 

328 # κλιτικός τύπος επιρρήματος: 'κλιτικός' ???, τύπος: sort, type, 

329 # mould, stamp (of a person character) // model, type (of car, etc) // 

330 # shape, form // the press, the newspapers collectively // formality, 

331 # convention // formula // a man, a guy, a chap επιρρήματος: [επίρρημα: 

332 # adverb (lexical category)] // Genitive singular form of επίρρημα 

333 # (epírrima). 

334 "κλιτικός τύπος επιρρήματος": {"pos": "adv", "tags": ["form-of"]}, 

335 # κλιτικός τύπος κυρίου ονόματος: 'κλιτικός' ???, τύπος: sort, type, 

336 # mould, stamp (of a person character) // model, type (of car, etc) // 

337 # shape, form // the press, the newspapers collectively // formality, 

338 # convention // formula // a man, a guy, a chap κυρίου: [κύριος: mister 

339 # (title conferred on an adult male) // master (someone who has control 

340 # over something or someone) // sir (an address to any male)] // 

341 # [κύριος: main, principal, most important] // Genitive singular form of 

342 # κύριος (kýrios). ονόματος: [όνομα: name // name, reputation // noun 

343 # (sensu lato), a word class including substantives (nouns, sensu 

344 # stricto) and adjectives] // Genitive singular form of όνομα (ónoma). 

345 "κλιτικός τύπος κυρίου ονόματος": {"pos": "name", "tags": ["form-of"]}, 

346 # κλιτικός τύπος μετοχής: 'κλιτικός' ???, τύπος: sort, type, mould, 

347 # stamp (of a person character) // model, type (of car, etc) // shape, 

348 # form // the press, the newspapers collectively // formality, 

349 # convention // formula // a man, a guy, a chap μετοχής: [μετοχή: 

350 # participle // share, stock] // Genitive singular form of μετοχή 

351 # (metochí). 

352 "κλιτικός τύπος μετοχής": { 

353 "pos": "verb", 

354 "tags": ["participle", "form-of"], 

355 }, 

356 # κλιτικός τύπος ουσιαστικού (διλεκτικό ουσιαστικό): 'κλιτικός' ???, 

357 # τύπος: sort, type, mould, stamp (of a person character) // model, type 

358 # (of car, etc) // shape, form // the press, the newspapers collectively 

359 # // formality, convention // formula // a man, a guy, a chap 

360 # 'ουσιαστικού' ???, 'διλεκτικό' ???, ουσιαστικό: noun, substantive 

361 "κλιτικός τύπος ουσιαστικού (διλεκτικό ουσιαστικό)": { 

362 "pos": "noun", 

363 "tags": ["form-of"], 

364 }, 

365 # κλιτικός τύπος ουσιαστικού, ουδέτερο, πληθυντικός: 'κλιτικός' ???, 

366 # τύπος: sort, type, mould, stamp (of a person character) // model, type 

367 # (of car, etc) // shape, form // the press, the newspapers collectively 

368 # // formality, convention // formula // a man, a guy, a chap 

369 # 'ουσιαστικού' ???, ουδέτερο: neuter ουδέτερο: [ουδέτερος: neuter, 

370 # sexless // neutral, non-aligned // the gender: neuter // neutral] // 

371 # Accusative masculine singular form of ουδέτερος (oudéteros). // 

372 # Nominative, accusative and vocative neuter singular form of ουδέτερος 

373 # (oudéteros). πληθυντικός: plural 

374 "κλιτικός τύπος ουσιαστικού, ουδέτερο, πληθυντικός": { 

375 "pos": "noun", 

376 "tags": ["form-of"], 

377 }, 

378 # κλιτικός τύπος ουσιαστικού: 'κλιτικός' ???, τύπος: sort, type, 

379 # mould, stamp (of a person character) // model, type (of car, etc) // 

380 # shape, form // the press, the newspapers collectively // formality, 

381 # convention // formula // a man, a guy, a chap 'ουσιαστικού' ???, 

382 "κλιτικός τύπος ουσιαστικού": {"pos": "noun", "tags": ["form-of"]}, 

383 # κλιτικός τύπος πολυλεκτικού όρου: 'κλιτικός' ???, τύπος: sort, 

384 # type, mould, stamp (of a person character) // model, type (of car, 

385 # etc) // shape, form // the press, the newspapers collectively // 

386 # formality, convention // formula // a man, a guy, a chap 

387 # 'πολυλεκτικού' ???, 'όρου' ???, 

388 "κλιτικός τύπος πολυλεκτικού όρου": {"pos": "name"}, 

389 # κορεατικό αλφάβητο: 'κορεατικό' ???, αλφάβητο: alphabet, a series 

390 # of letters or graphics representing particular sounds or phonemes // 

391 # the ABCs of a subject matter; the basics; the most basic fundamentals 

392 # of a certain sphere of knowledge // [αλφάβητος: Rare form of αλφάβητο 

393 # (alfávito).] // Accusative singular form of αλφάβητος (alfávitos). 

394 "κορεατικό αλφάβητο": {"pos": "character", "tags": ["hangeul"]}, 

395 # κύριο όνομα: κύριο: [κύριος: mister (title conferred on an adult 

396 # male) // master (someone who has control over something or someone) // 

397 # sir (an address to any male)] // [κύριος: main, principal, most 

398 # important] // Accusative masculine singular form of κύριος (kýrios). 

399 # // Nominative, accusative and vocative neuter singular form of κύριος 

400 # (kýrios). κύριο: [κύριος: mister (title conferred on an adult male) // 

401 # master (someone who has control over something or someone) // sir (an 

402 # address to any male)] // [κύριος: main, principal, most important] // 

403 # Accusative singular form of κύριος (kýrios). όνομα: name // name, 

404 # reputation // noun (sensu lato), a word class including substantives 

405 # (nouns, sensu stricto) and adjectives 

406 "κύριο όνομα": {"pos": "name"}, 

407 # μετοχή του βαρυφορτώνω, βαρυφορτώνομαι: μετοχή: participle // share, 

408 # stock του: [ο: the definite masculine singular article. the] // 

409 # genitive masculine singular of ο (o) (the) // genitive neuter singular 

410 # of ο (o) (the) του: him, it // his, its 'βαρυφορτώνω' ???, 

411 # 'βαρυφορτώνομαι' ???, 

412 "μετοχή του": { 

413 "pos": "verb", 

414 "tags": ["participle"], 

415 }, 

416 "μετοχή": {"pos": "verb", "tags": ["participle"]}, 

417 # μετοχικό επίθετο: 'μετοχικό' ???, επίθετο: adjective // surname 

418 "μετοχικό επίθετο": {"pos": "adj", "tags": ["possessive"]}, 

419 # μονολεκτικό ουσιαστικό: 'μονολεκτικό' ???, ουσιαστικό: noun, 

420 # substantive 

421 "μονολεκτικό ουσιαστικό": {"pos": "noun"}, 

422 # μόριο (καθαρεύουσα): μόριο: molecule // particle, speck (a very 

423 # small piece of matter) // part (of the body) // part (of the body) // 

424 # genitalia, parts // particle // point (in an evaluative scale) 

425 # καθαρεύουσα: Katharevousa (purist variant of Modern Greek) 

426 "μόριο (καθαρεύουσα)": {"pos": "particle", "tags": ["Katharevousa"]}, 

427 # μόριο: μόριο: molecule // particle, speck (a very small piece of 

428 # matter) // part (of the body) // part (of the body) // genitalia, 

429 # parts // particle // point (in an evaluative scale) 

430 "μόριο": {"pos": "particle"}, 

431 # ουσιαστικό (καθαρεύουσα): ουσιαστικό: noun, substantive καθαρεύουσα: 

432 # Katharevousa (purist variant of Modern Greek) 

433 "ουσιαστικό (καθαρεύουσα)": {"pos": "noun", "tags": ["Katharevousa"]}, 

434 # ουσιαστικό - επίθετο: ουσιαστικό: noun, substantive '' ???, 

435 # επίθετο: adjective // surname 

436 "ουσιαστικό - επίθετο": {"pos": "noun", "tags": ["adjective", "noun"]}, 

437 # ουσιαστικό - επιφώνημα: ουσιαστικό: noun, substantive '' ???, 

438 # επιφώνημα: interjection, exclamation 

439 "ουσιαστικό - επιφώνημα": {"pos": "noun", "tags": ["interjection", "noun"]}, 

440 # ουσιαστικό - κύριο όνομα: ουσιαστικό: noun, substantive '' ???, 

441 # κύριο: [κύριος: mister (title conferred on an adult male) // master 

442 # (someone who has control over something or someone) // sir (an address 

443 # to any male)] // [κύριος: main, principal, most important] // 

444 # Accusative masculine singular form of κύριος (kýrios). // Nominative, 

445 # accusative and vocative neuter singular form of κύριος (kýrios). 

446 # κύριο: [κύριος: mister (title conferred on an adult male) // master 

447 # (someone who has control over something or someone) // sir (an address 

448 # to any male)] // [κύριος: main, principal, most important] // 

449 # Accusative singular form of κύριος (kýrios). όνομα: name // name, 

450 # reputation // noun (sensu lato), a word class including substantives 

451 # (nouns, sensu stricto) and adjectives 

452 "ουσιαστικό - κύριο όνομα": {"pos": "name"}, 

453 # ουσιαστικό - πολυλεκτικός όρος: ουσιαστικό: noun, substantive '' 

454 # ???, πολυλεκτικός: polylectic όρος: term (word, phrase; limitation, 

455 # restriction) // definition, stipulation // clause // article όρος: 

456 # mount, mountain 

457 "ουσιαστικό - πολυλεκτικός όρος": {"pos": "noun"}, 

458 # ουσιαστικό /ˈkɒndʌkt/: ουσιαστικό: noun, substantive '/ˈkɒndʌkt/' 

459 # ???, 

460 "ουσιαστικό": {"pos": "noun"}, 

461 # ουσιαστικό αρσενικό: ουσιαστικό: noun, substantive αρσενικό: 

462 # [αρσενικός: masculine] // inflection of αρσενικός (arsenikós): // 

463 # masculine accusative singular // inflection of αρσενικός (arsenikós): 

464 # // neuter nominative/accusative/vocative singular αρσενικό: arsenic 

465 "ουσιαστικό αρσενικό": {"pos": "noun", "tags": ["masculine"]}, 

466 # ουσιαστικό επίρρημα: ουσιαστικό: noun, substantive επίρρημα: adverb 

467 # (lexical category) 

468 "ουσιαστικό επίρρημα": {"pos": "adv", "tags": ["adverb", "noun"]}, 

469 # ουσιαστικό θηλυκό: ουσιαστικό: noun, substantive θηλυκό: woman, 

470 # female θηλυκό: [θηλυκός: female (feminine gender) // feminine (female 

471 # person or animal)] // Accusative masculine singular form of θηλυκός 

472 # (thilykós). // Nominative, accusative and vocative neuter singular 

473 # form of θηλυκός (thilykós). 

474 "ουσιαστικό θηλυκό": {"pos": "noun", "tags": ["feminine"]}, 

475 # ουσιαστικό και επίθετο: ουσιαστικό: noun, substantive και: and // 

476 # also // plus, and // past (time) επίθετο: adjective // surname 

477 "ουσιαστικό και επίθετο": {"pos": "noun", "tags": ["adjective", "noun"]}, 

478 # ουσιαστικό και επιφώνημα: ουσιαστικό: noun, substantive και: and // 

479 # also // plus, and // past (time) επιφώνημα: interjection, exclamation 

480 "ουσιαστικό και επιφώνημα": { 

481 "pos": "noun", 

482 "tags": ["interjection", "noun"], 

483 }, 

484 # ουσιαστικό και κλιτικός τύπος ουσιαστικού: ουσιαστικό: noun, 

485 # substantive και: and // also // plus, and // past (time) 'κλιτικός' 

486 # ???, τύπος: sort, type, mould, stamp (of a person character) // 

487 # model, type (of car, etc) // shape, form // the press, the newspapers 

488 # collectively // formality, convention // formula // a man, a guy, a 

489 # chap 'ουσιαστικού' ???, 

490 "ουσιαστικό και κλιτικός τύπος ουσιαστικού": {"pos": "noun"}, 

491 # ουσιαστικό και κύριο όνομα: ουσιαστικό: noun, substantive και: and 

492 # // also // plus, and // past (time) κύριο: [κύριος: mister (title 

493 # conferred on an adult male) // master (someone who has control over 

494 # something or someone) // sir (an address to any male)] // [κύριος: 

495 # main, principal, most important] // Accusative masculine singular form 

496 # of κύριος (kýrios). // Nominative, accusative and vocative neuter 

497 # singular form of κύριος (kýrios). κύριο: [κύριος: mister (title 

498 # conferred on an adult male) // master (someone who has control over 

499 # something or someone) // sir (an address to any male)] // [κύριος: 

500 # main, principal, most important] // Accusative singular form of κύριος 

501 # (kýrios). όνομα: name // name, reputation // noun (sensu lato), a word 

502 # class including substantives (nouns, sensu stricto) and adjectives 

503 "ουσιαστικό και κύριο όνομα": { 

504 "pos": "noun", 

505 "tags": ["proper-noun", "noun"], 

506 }, 

507 # ουσιαστικό, επίθετο: ουσιαστικό: noun, substantive επίθετο: 

508 # adjective // surname 

509 "ουσιαστικό, επίθετο": {"pos": "noun", "tags": ["adjective", "noun"]}, 

510 # ουσιαστικό, πολυλεκτικός όρος: ουσιαστικό: noun, substantive 

511 # πολυλεκτικός: polylectic όρος: term (word, phrase; limitation, 

512 # restriction) // definition, stipulation // clause // article όρος: 

513 # mount, mountain 

514 "ουσιαστικό, πολυλεκτικός όρος": {"pos": "noun"}, 

515 # ουσιαστικό, ρήμα: ουσιαστικό: noun, substantive ρήμα: verb 

516 "ουσιαστικό, ρήμα": {"pos": "noun", "tags": ["noun", "verb"]}, 

517 # πoλυλεκτικό ουσιαστικό: 'πoλυλεκτικό' ???, ουσιαστικό: noun, 

518 # substantive 

519 "πoλυλεκτικό ουσιαστικό": {"pos": "noun"}, 

520 # παθητική μετοχή του μυώ: 'παθητική' ???, μετοχή: participle // 

521 # share, stock του: [ο: the definite masculine singular article. the] // 

522 # genitive masculine singular of ο (o) (the) // genitive neuter singular 

523 # of ο (o) (the) του: him, it // his, its 'μυώ' ???, 

524 "παθητική μετοχή του": {"pos": "verb", "tags": ["participle", "passive"]}, 

525 # παροιμία - έκφραση: παροιμία: proverb, saying, adage, maxim (phrase 

526 # expressing a basic truth) '' ???, έκφραση: expression 

527 "παροιμία - έκφραση": {"pos": "phrase", "tags": ["idiomatic"]}, 

528 # παροιμία: παροιμία: proverb, saying, adage, maxim (phrase expressing 

529 # a basic truth) 

530 "παροιμία": {"pos": "phrase", "tags": ["idiomatic"]}, 

531 # περιφραστικό ουσιαστικό: 'περιφραστικό' ???, ουσιαστικό: noun, 

532 # substantive 

533 "περιφραστικό ουσιαστικό": {"pos": "noun"}, 

534 # πολυλεκτικό επίθετο: 'πολυλεκτικό' ???, επίθετο: adjective // 

535 # surname 

536 "πολυλεκτικό επίθετο": {"pos": "adj"}, 

537 # πολυλεκτικό επίρρημα: 'πολυλεκτικό' ???, επίρρημα: adverb (lexical 

538 # category) 

539 "πολυλεκτικό επίρρημα": {"pos": "adv"}, 

540 # πολυλεκτικό ουσιαστικό: 'πολυλεκτικό' ???, ουσιαστικό: noun, 

541 # substantive 

542 "πολυλεκτικό ουσιαστικό": {"pos": "noun"}, 

543 # πολυλεκτικός όρος επίθετο: πολυλεκτικός: polylectic όρος: term 

544 # (word, phrase; limitation, restriction) // definition, stipulation // 

545 # clause // article όρος: mount, mountain επίθετο: adjective // surname 

546 "πολυλεκτικός όρος επίθετο": {"pos": "adj"}, 

547 # πολυλεκτικός όρος ουσιαστικό: πολυλεκτικός: polylectic όρος: term 

548 # (word, phrase; limitation, restriction) // definition, stipulation // 

549 # clause // article όρος: mount, mountain ουσιαστικό: noun, substantive 

550 "πολυλεκτικός όρος ουσιαστικό": {"pos": "noun"}, 

551 # πολυλεκτικός όρος: πολυλεκτικός: polylectic όρος: term (word, 

552 # phrase; limitation, restriction) // definition, stipulation // clause 

553 # // article όρος: mount, mountain 

554 "πολυλεκτικός όρος": {"pos": "noun"}, 

555 # προσδιοριστής: 'προσδιοριστής' ???, 

556 "προσδιοριστής": {"pos": "det"}, 

557 # πρόθεση: πρόθεση: preposition // intent, intention, purpose πρόθεση: 

558 # prosthesis (an artificial replacement for a body part) // prosthetic 

559 "πρόθεση": {"pos": "prep"}, 

560 # πρόθημα: πρόθημα: prefix 

561 "πρόθημα": {"pos": "prefix"}, 

562 # πρόσφυμα: πρόσφυμα: affix 

563 "πρόσφυμα": {"pos": "affix"}, 

564 # ρήμα - επιφώνημα: ρήμα: verb '' ???, επιφώνημα: interjection, 

565 # exclamation 

566 "ρήμα - επιφώνημα": {"pos": "verb", "tags": ["interjection", "verb"]}, 

567 # ρήμα μεταβατικό: ρήμα: verb μεταβατικό: [μεταβατικός: transitive // 

568 # transition // transitional] // Accusative masculine singular form of 

569 # μεταβατικός (metavatikós). // Nominative, accusative and vocative 

570 # neuter singular form of μεταβατικός (metavatikós). 

571 "ρήμα μεταβατικό": {"pos": "verb", "tags": ["transitive"]}, 

572 # ρήμα, αόριστος: ρήμα: verb αόριστος: vague // indefinite // 

573 # preterite αόριστος: aorist, past tense, simple past, perfective past 

574 "ρήμα, αόριστος": {"pos": "verb", "tags": ["aorist"]}, 

575 # ρήμα, μόριο, ουσιαστικό: ρήμα: verb μόριο: molecule // particle, 

576 # speck (a very small piece of matter) // part (of the body) // part (of 

577 # the body) // genitalia, parts // particle // point (in an evaluative 

578 # scale) ουσιαστικό: noun, substantive 

579 "ρήμα, μόριο, ουσιαστικό": { 

580 "pos": "verb", 

581 "tags": ["particle", "noun", "verb"], 

582 }, 

583 # ρήμα, ουσιαστικό: ρήμα: verb ουσιαστικό: noun, substantive 

584 "ρήμα, ουσιαστικό": {"pos": "verb", "tags": ["noun", "verb"]}, 

585 # ρήμα: ρήμα: verb 

586 "ρήμα": {"pos": "verb"}, 

587 # ρίζα: ρίζα: root (of a plant) // root // root 

588 "ρίζα": {"pos": "root", "tags": ["morpheme"]}, 

589 # ρηματική έκφραση: 'ρηματική' ???, έκφραση: expression 

590 "ρηματική έκφραση": {"pos": "verb"}, 

591 # σουπίνο: 'σουπίνο' ???, 

592 "σουπίνο": {"pos": "verb", "tags": ["supine"]}, 

593 # συντομομορφή - ουσιαστικό: συντομομορφή: abbreviation: initialism, 

594 # acronym, etc '' ???, ουσιαστικό: noun, substantive 

595 "συντομομορφή - ουσιαστικό": { 

596 "pos": "abbrev", 

597 "tags": ["noun", "abbreviation"], 

598 }, 

599 # συντομομορφή, αρκτικόλεξο: συντομομορφή: abbreviation: initialism, 

600 # acronym, etc αρκτικόλεξο: initialism 

601 "συντομομορφή, αρκτικόλεξο": {"pos": "abbrev", "tags": ["initialism"]}, 

602 # συντομομορφή: συντομομορφή: abbreviation: initialism, acronym, etc 

603 "συντομομορφή": {"pos": "abbrev"}, 

604 # σχήμα του ρήματος board: σχήμα: figure, shape του: [ο: the definite 

605 # masculine singular article. the] // genitive masculine singular of ο 

606 # (o) (the) // genitive neuter singular of ο (o) (the) του: him, it // 

607 # his, its ρήματος: [ρήμα: verb] // Genitive singular form of ρήμα 

608 # (ríma). 'board' ???, 

609 "σχήμα του ρήματος": {"pos": "verb", "tags": ["form-of"]}, 

610 # σύμβολο: σύμβολο: symbol, character, glyph 

611 "σύμβολο": {"pos": "symbol"}, 

612 # σύνδεσμος (καθαρεύουσα): σύνδεσμος: conjunction // ligament // HTML 

613 # link // union, relationship, contact καθαρεύουσα: Katharevousa (purist 

614 # variant of Modern Greek) 

615 "σύνδεσμος (καθαρεύουσα)": {"pos": "conj", "tags": ["Katharevousa"]}, 

616 # σύνδεσμος: σύνδεσμος: conjunction // ligament // HTML link // union, 

617 # relationship, contact 

618 "σύνδεσμος": {"pos": "conj"}, 

619 # σύνθετο επίθετο: 'σύνθετο' ???, επίθετο: adjective // surname 

620 "σύνθετο επίθετο": {"pos": "adj"}, 

621 # σύνθετο επίρρημα, έκφραση: 'σύνθετο' ???, επίρρημα: adverb (lexical 

622 # category) έκφραση: expression 

623 "σύνθετο επίρρημα, έκφραση": {"pos": "adv"}, 

624 # σύνθετο ουσιαστικό: 'σύνθετο' ???, ουσιαστικό: noun, substantive 

625 "σύνθετο ουσιαστικό": {"pos": "noun"}, 

626 # φράση: φράση: phrase, expression 

627 "φράση": {"pos": "phrase"}, 

628 # χαρακτήρας: χαρακτήρας: character (the qualities which identify a 

629 # person) // character (a person's behaviours which identify them) // 

630 # character, letter, symbol 

631 "χαρακτήρας": {"pos": "symbol"}, 

632 "ρηματικός τύπος": {"pos": "verb"}, 

633 # Japanese translitteration entries 

634 "μεταγραφή": {"pos": "romanization"}, 

635 "συγχώνευση": {"pos": "contraction"}, 

636 "μορφή σύνθετου όρου": {"pos": "contraction"}, 

637} 

638 

639POS_HEADINGS_RE = re.compile( 

640 r"(" 

641 + r"|".join( 

642 re.escape(s) for s in sorted(POS_HEADINGS.keys(), key=len, reverse=True) 

643 ) 

644 + r")(.*)" 

645) 

646 

647 

648SubSectionMap = TypedDict( 

649 "SubSectionMap", 

650 { 

651 # TODO: Use Typing.Required (3.11>=) when python 3.10 support drops 

652 "type": Heading, 

653 # "debug" is legacy from [en], might be implemented 

654 "debug": str, 

655 "tags": Tags, 

656 }, 

657 total=False, 

658) 

659 

660 

661SUBSECTION_HEADINGS: dict[str, SubSectionMap] = { 

662 "etymology": {"type": Heading.Etym}, 

663 "ετυμολογία": {"type": Heading.Etym}, 

664 "πηγές": {"type": Heading.Ignored}, # Not etymology, but literary sources 

665 "pronunciation": {"type": Heading.Pron}, 

666 "προφορά": {"type": Heading.Pron}, 

667 "αναλυτική κλίση": {"type": Heading.Infl}, 

668 "κλίση": {"type": Heading.Infl}, 

669 "references": {"type": Heading.Ref}, 

670 "αναφορές": {"type": Heading.Ref}, 

671 # Lit. other spellings 

672 # Ex. γορίλλας/γορίλας @ https://el.wiktionary.org/wiki/γορίλλας 

673 # Ex. ερωοτοπάλεμα/ἐρωτοπάλεμα @ https://el.wiktionary.org/wiki/ερωτοπάλεμα 

674 # from "{{άλλη γραφή}}" that expands to "άλλες γραφές" 

675 # cf. γρ template parsing at pos.py. Keep both in sync. 

676 "άλλες γραφές": {"type": Heading.AltOf}, 

677 # Lit. other forms 

678 # Ex. ελαιόδενδρο/ελιά @ https://el.wiktionary.org/wiki/ελαιόδενδρο 

679 # from "{{μορφές}}" that expands to "άλλες μορφές" 

680 # cf. γρ template parsing at pos.py. Keep both in sync. 

681 "άλλες μορφές": {"type": Heading.FormOf}, 

682 "ανεπίσημα": {"type": Heading.Related}, 

683 "συγγενικά": {"type": Heading.Related}, 

684 "πολυλεκτικοί όροι": {"type": Heading.Related}, 

685 "συγγενείς": {"type": Heading.Related}, 

686 # Homonyms 

687 "ομώνυμα / ομόηχα": {"type": Heading.Homonyms}, 

688 "συνώνυμα": {"type": Heading.Synonyms}, 

689 # Partial synonyms 

690 "μερική συνωνυμία": {"type": Heading.Synonyms}, 

691 # Exact synonym 

692 "ταυτόσημο": {"type": Heading.Synonyms}, 

693 "ταυτόσημα": {"type": Heading.Synonyms}, 

694 "εκφράσεις": {"type": Heading.Related, "tags": ["idiomatic"]}, 

695 "σύνθετα": {"type": Heading.Related, "tags": ["compound"]}, 

696 "μεταγραφές": {"type": Heading.Transliterations}, 

697 # Related words in foreign languages 

698 "παράγωγα": {"type": Heading.Derived}, 

699 # Derived words 

700 "απόγονοι": {"type": Heading.Derived}, 

701 "υποκοριστικά": {"type": Heading.Derived, "tags": ["diminutive"]}, 

702 # Anagrams 

703 "αλλόγλωσσα παράγωγα": {"type": Heading.Translations}, 

704 "μεταφράσεις": {"type": Heading.Translations}, 

705 "αναγραμματισμοί": {"type": Heading.Ignored}, 

706 # "misspelling" as POS 

707 "ανορθογραφία": {"type": Heading.Ignored}, 

708 # see also 

709 "δείτε επίσης": {"type": Heading.Ignored}, 

710 # Antonyms 

711 "αντώνυμα": {"type": Heading.Antonyms}, 

712 "αντώνυμη έκφραση": {"type": Heading.Antonyms}, 

713 "αρχικοί χρόνοι": {"type": Heading.Notes}, 

714 "σημειώσεις": {"type": Heading.Notes}, 

715 "υποσημειώσεις": {"type": Heading.Notes}, 

716 # 'answers' to a phrasebook question: see τι κάνεις 

717 "απαντήσεις": {"type": Heading.Ignored}, 

718 # Proverbs 

719 "παροιμίες": {"type": Heading.Ignored}, 

720 # External links 

721 "εξωτερικοί σύνδεσμοι": {"type": Heading.Ignored}, 

722 # "": {"type": Heading.Err}, 

723} 

724 

725SUBSECTIONS_RE = re.compile( 

726 r"([ =]*" 

727 + r"|".join( 

728 re.escape(s) 

729 for s in sorted(SUBSECTION_HEADINGS.keys(), key=len, reverse=True) 

730 ) 

731 + r")(.*)[ =]*" 

732)