Coverage for src/wiktextract/extractor/fr/tags.py: 88%

47 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-06-23 09:14 +0000

1# Grammatical glossary appendix: 

2# https://fr.wiktionary.org/wiki/Annexe:Glossaire_grammatical 

3# List of templates: 

4# https://fr.wiktionary.org/wiki/Wiktionnaire:Liste_de_tous_les_modèles 

5from .models import WordEntry 

6from .topics import SLANG_TOPICS, TOPIC_TAGS 

7 

8# https://en.wikipedia.org/wiki/Grammatical_gender 

9GENDER_TAGS: dict[str, str | list[str]] = { 

10 "commun": "common", 

11 "féminin": "feminine", 

12 "masculin": "masculine", 

13 "neutre": "neuter", 

14 # https://fr.wiktionary.org/wiki/Modèle:mf 

15 "masculin et féminin identiques": ["masculine", "feminine"], 

16 # table header: https://fr.wiktionary.org/wiki/Modèle:fr-rég 

17 "masculin et féminin": ["masculine", "feminine"], 

18 # "Modèle:mf ?", "Modèle:fm ?" 

19 "masculin ou féminin (l’usage hésite)": ["masculine", "feminine"], 

20 "féminin ou masculin (l’usage hésite)": ["feminine", "masculine"], 

21 "invariable": "invariable", # Modèle:invar 

22 # Modèle:flex-ku-nommixt 

23 "masculin sing.": ["masculine", "singular"], 

24 "féminin sing.": ["feminine", "singular"], 

25 # Template:ja-flx-adj-な 

26 "neutre négatif": ["neuter", "negative"], 

27 "neutre passé": ["neuter", "past"], 

28 "neutre négatif passé": ["neuter", "negative", "past"], 

29 "poli négatif": ["polite", "negative"], 

30 "poli passé": ["polite", "past"], 

31 "poli négatif passé": ["polite", "negative", "past"], 

32 # Template:m 

33 "masculin animé": ["masculine", "animate"], 

34 "masculin inanimé": ["masculine", "inanimate"], 

35 # Template:f 

36 "féminin animé": ["feminine", "animate"], 

37 "féminin inanimé": ["feminine", "inanimate"], 

38 # Template:n 

39 "neutre animé": ["neuter", "animate"], 

40 "neutre inanimé": ["neuter", "inanimate"], 

41 # Template:fr-rég 

42 "masculin\net féminin": ["masculine", "feminine"], 

43} 

44 

45# https://en.wikipedia.org/wiki/Grammatical_number 

46NUMBER_TAGS: dict[str, str | list[str]] = { 

47 "singulier": "singular", 

48 "pluriel": "plural", 

49 "duel": "dual", 

50 "collectif": "collective", 

51 "singulatif": "singulative", 

52 "indénombrable": "uncountable", # sv-nom-c-ind 

53 "au singulier": "singular", 

54 "au singulier uniquement": "singular-only", 

55 "au pluriel": "plural", 

56 "au pluriel uniquement": "plural-only", 

57 "singulier et pluriel identiques": ["singular", "plural"], 

58 "nom collectif": "collective", 

59 # "générique": "", # Modèle:g 

60 # "nom d'unité": "", # Modèle:nu 

61 "généralement indénombrable": "uncountable", 

62 "dénombrable": "countable", 

63 # Modèle:br-nom 

64 "pluriel 1": "plural", 

65 "pluriel 2": "plural", 

66 "pluriel 3": "plural", 

67 "pluriel 4": "plural", 

68 # https://fr.wiktionary.org/wiki/Modèle:avk-tab-conjug 

69 "1": "first-person", 

70 "2": "second-person", 

71 "3": "third-person", 

72 "4": "fourth-person", 

73 # Template:nl-conj-cons 

74 # https://en.wikipedia.org/wiki/Dutch_grammar#Personal_pronouns 

75 "ik": ["first-person", "singular"], 

76 "jij": ["second-person", "singular", "informal"], 

77 "hij, zij, het": "third-person", 

78 "wij": ["first-person", "plural"], 

79 "jullie": ["second-person", "plural", "informal"], 

80 "zij": ["third-person", "plural"], 

81 "u": "second-person", 

82 # Template:cs-conj-e 

83 "já": ["first-person", "singular"], 

84 "ty": ["second-person", "singular"], 

85 "on\nona\nono": ["third-person", "singular"], 

86 "my": ["first-person", "plural"], 

87 "vy": ["second-person", "plural"], 

88 "oni\nony\nony": ["third-person", "plural"], 

89 # Template:ro-verb-1-tab 

90 "1ʳᵉ personne du singulier\nprésent de l’indicatif": [ 

91 "first-person", 

92 "singular", 

93 "present", 

94 "indicative", 

95 ], 

96 "3ᵉ personne du singulier\nprésent du subjonctif": [ 

97 "third-person", 

98 "singular", 

99 "present", 

100 "subjunctive", 

101 ], 

102} 

103 

104# https://en.wikipedia.org/wiki/Grammatical_mood 

105MOOD_TAGS: dict[str, str] = { 

106 "indicatif": "indicative", 

107 "subjonctif": "subjunctive", 

108 "conditionnel": "conditional", 

109 "impératif": "imperative", 

110 "volitif": "volitive", 

111 "déclaratif": "declarative", 

112 "interrogatif": "interrogative", 

113 "aperceptif": "apperceptive", 

114 "euphémique": "euphemistic", 

115 "évidentiel": "evidential", 

116 "spéculatif": "speculative", 

117 "assertif": "assertive", 

118 "hortatif": "hortative", 

119 "promissif": "promissive", 

120 "conditionnel / subjonctif": ["conditional", "subjunctive"], 

121 "conjonctif": "subjunctive", 

122 "provisionnel": "temporal", 

123 # Template:de-conj 

124 "subjonctif i": "subjunctive-i", 

125 "subjonctif ii": "subjunctive-ii", 

126 "conjectural/volitif": ["conjectural", "volitive"], 

127 # Modèle:ro-verb-décl 

128 "présomptif": "presumptive", 

129 "potentiel": "potential", 

130} 

131 

132VERB_FORM_TAGS: dict[str, str | list[str]] = { 

133 "participe": "participle", 

134 "imparfait": "imperfect", 

135 # Template:ku-conj-trans 

136 "parfait": "perfect", 

137 "imparfait narratif": ["imperfect", "narrative"], 

138 "infinitif": "infinitive", 

139 "gérondif": "gerund", 

140 # template "pt-verbe-flexion" 

141 "infinitif personnel": ["infinitive", "personal"], 

142 "supin": "supine", 

143 # Template:ko-conj 

144 "conjugaison": "conjugation", 

145 "radical": "radical", 

146 "formes finales": "final", 

147 "registre formel": "formal", 

148 "registre informel": "informal", 

149 "non poli": "impolite", 

150 "poli": "polite", 

151 "formes nominales": "nominal", 

152 "formes conjonctives": "subjunctive", 

153 # Template:ja-在る 

154 "formes de base": "base-form", 

155 "affirmatif": "affirmative", 

156 "négatif": "negative", 

157 "adverbial": "adverbial", 

158 # Template:bg-verbe186 

159 "aoriste": "aorist", 

160 "participe passé passif": ["participle", "past", "passive"], 

161 "participe passé actif": ["participle", "past", "active"], 

162 "participe imparfait": ["participle", "imperfect"], 

163 "auxiliaire": "auxiliary", 

164 "bitransitif": "ditransitive", 

165 "déterminé": "determinate", 

166 "indéterminé": "indeterminate", 

167 # Template:irrégulier 

168 "irrégulier": "irregular", 

169 # Template:se-conj 

170 "nom d’action": "noun-from-verb", 

171 "thème négatif": "negative", 

172} 

173 

174# https://en.wikipedia.org/wiki/Grammatical_case 

175CASE_TAGS: dict[str, str | list[str]] = { 

176 "ablatif": "ablative", 

177 "accusatif": "accusative", 

178 "accusatif génitif": ["accusative", "genitive"], 

179 "nominatif": "nominative", 

180 "datif": "dative", 

181 "génitif": "genitive", 

182 "vocatif": "vocative", 

183 "instrumental": "instrumental", 

184 "locatif": "locative", 

185 "comitatif": "comitative", 

186 "essif": "essive", 

187 "illatif": "illative", 

188 # Template:ro-nom-tab 

189 "nominatif\naccusatif": ["nominative", "accusative"], 

190 "datif\ngénitif": ["dative", "genitive"], 

191 # Template:ko-nom 

192 "nominatif / attributif": ["nominative", "attributive"], 

193 # Modèle:fro-adj 

194 "sujet": "subject", 

195 "régime": "oblique", 

196 # Template:se-décl-pari 

197 "accusatif\ngénitif": ["accusative", "genitive"], 

198 # Template:fi-décl-ihminen 

199 "partitif": "partitive", 

200 "inessif": "inessive", 

201 "élatif": "elative", 

202 "adessif": "adessive", 

203 "allatif": "allative", 

204 "translatif": "translative", 

205 "abessif": "abessive", 

206 "instructif": "instructive", 

207} 

208 

209# https://en.wikipedia.org/wiki/Grammatical_tense 

210TENSE_TAGS: dict[str, str | list[str]] = { 

211 "présent": "present", 

212 "passé": "past", 

213 "passé simple": "past", 

214 "futur": "future", 

215 "futur simple": "future", 

216 # https://en.wikipedia.org/wiki/Passé_composé 

217 "passé composé": ["past", "multiword-construction"], 

218 "plus-que-parfait": "pluperfect", 

219 "passé antérieur": ["past", "anterior"], 

220 "futur antérieur": ["future", "perfect"], 

221 "prétérit": "preterite", 

222 "présent simple,\n3ᵉ pers. sing.": ["present", "third-person", "singular"], 

223 "participe passé": ["participle", "past"], 

224 "participe présent": ["participle", "present"], 

225 # Template:ku-conj-trans 

226 "présent progressif": ["present", "progressive"], 

227 "prétérit et imparfait": ["preterite", "imperfect"], 

228 "non passé": "non-past", 

229 "présent / futur": ["present", "future"], 

230 # Template:de-conj 

231 "futur i": "future-i", 

232 "futur ii": "future-ii", 

233 # Template:it-irrégulier-avere-1 

234 "présent affirmatif": ["present", "affirmative"], 

235 "présent négatif": ["present", "negative"], 

236 # Modèle:ro-verb-décl 

237 "infinitif passé": ["infinitive", "past"], 

238 "futur populaire": ["future", "colloquial"], 

239 "futur littéraire": ["future", "literary"], 

240 "présent progrésif": ["present", "progressive"], 

241} 

242 

243# https://en.wikipedia.org/wiki/Grammatical_person 

244PERSON_TAGS: dict[str, str | list[str]] = { 

245 "1ᵉ personne": "first-person", 

246 "1ʳᵉ personne": "first-person", 

247 "2ᵉ personne": "second-person", 

248 "3ᵉ personne": "third-person", 

249 # Modèle:avk-conj 

250 "1ʳᵉ du sing.": ["first-person", "singular"], 

251 "2ᵉ du sing.": ["second-person", "singular"], 

252 "3ᵉ du sing.": ["third-person", "singular"], 

253 "1ʳᵉ du plur.": ["first-person", "plural"], 

254 "2ᵉ du plur.": ["second-person", "plural"], 

255 "3ᵉ du plur.": ["third-person", "plural"], 

256 "4ᵉ du plur.": ["fourth-person", "plural"], 

257 # Modèle:ro-verb-décl 

258 "1ʳᵉ personne\n(eu)": "first-person", 

259 "2ᵉ personne\n(tu)": "second-person", 

260 "3ᵉ personne\n(el/ea/el)": "third-person", 

261 "1ʳᵉ personne\n(noi)": "first-person", 

262 "2ᵉ personne\n(voi)": "second-person", 

263 "3ᵉ personne\n(ei/ele/ele)": "third-person", 

264 # Template:se-conj 

265 "je": ["first-person", "singular"], 

266 "tu": ["second-person", "singular"], 

267 "il/elle": ["third-person", "singular"], 

268 "nous deux": ["first-person", "dual"], 

269 "vous deux": ["second-person", "dual"], 

270 "ils/elles deux": ["third-person", "dual"], 

271 "nous": ["first-person", "plural"], 

272 "vous": ["second-person", "plural"], 

273 "ils/elles": ["third-person", "plural"], 

274} 

275 

276SEMANTICS_TAGS: dict[str, str] = { 

277 # https://en.wikipedia.org/wiki/Definiteness 

278 "défini": "definite", 

279 "indéfini": "indefinite", 

280 # template:ro-nom-tab 

281 "articulé": "definite", 

282 "non articulé": "indefinite", 

283} 

284 

285COMPARISON_TAGS: dict[str, str] = { 

286 # https://en.wikipedia.org/wiki/Comparison_(grammar) 

287 "positif": "positive", 

288 "comparatif": "comparative", 

289 "superlatif": "superlative", 

290 "non comparable": "not-comparable", 

291 "superlatif absolu": ["superlative", "absolute"], 

292} 

293 

294# https://en.wikipedia.org/wiki/Occitan_language#Writing_system 

295OCCITAN_NORM_TAGS: dict[str, str] = { 

296 # https://fr.wiktionary.org/wiki/Modèle:oc-norme_mistralienne 

297 "graphie mistralienne": "Mistralian", 

298 # https://fr.wiktionary.org/wiki/Modèle:oc-norme_classique 

299 # "graphie normalisée": "", 

300 # Modèle:oc-norme bonnaudienne 

301 # "graphie bonnaudienne": "", 

302} 

303 

304# https://en.wikipedia.org/wiki/Breton_mutations 

305# https://fr.wiktionary.org/wiki/Modèle:br-nom 

306BRETON_MUTATION_TAGS: dict[str, str] = { 

307 "non muté": "unmutated", 

308 "adoucissante": "mutation-soft", 

309 "durcissante": "mutation-hard", 

310 "spirante": "mutation-spirant", 

311 "nasale": "mutation-nasal", 

312} 

313 

314JA_TAGS: dict[str, str] = { 

315 # https://fr.wiktionary.org/wiki/Modèle:ja-trans 

316 "kanji": "kanji", 

317 "hiragana": "hiragana", 

318 "katakana": "katakana", 

319 "transcription": "transcription", 

320} 

321 

322OTHER_GRAMMATICAL_TAGS: dict[str, str] = { 

323 # https://fr.wiktionary.org/wiki/Modèle:be-tab-cas 

324 "prépositionnel": "prepositional", 

325 "anglicisme": "Anglicism", 

326 "pronominal": "pronominal", 

327 "diminutif": "diminutive", 

328 "réfléchi": "reflexive", # Modèle:réfl 

329 "réciproque": "reciprocal", # Modèle:réciproque 

330 "impersonnel": "impersonal", # Modèle:impers 

331 "transitif": "transitive", # Modèle:t 

332 "transitif indirect": ["transitive", "indirect"], # Modèle:transitif indir 

333 "intransitif": "intransitive", # Modèle:i 

334 "injurieux": "offensive", # Modèle:injurieux 

335 # Modèle:zh-formes 

336 "simplifié": "Simplified-Chinese", 

337 "traditionnel": "Traditional-Chinese", 

338 # Modèle:flex-ku-nomf 

339 "ézafé principal": ["ezafe", "primary"], 

340 "ézafé secondaire": ["ezafe", "secondary"], 

341 "cas oblique": "oblique", 

342 # Modèle:ku-conj-trans 

343 "forme affirmative": "affirmative", 

344 "forme négative": "negative", 

345 # Modèle:bg-nom 

346 "forme de base": "base-form", 

347 "pluriel numéral": ["plural", "numeral"], 

348 "animé": "animate", 

349 "inanimé": "inanimate", 

350 # Template:ko-nom 

351 "hangeul": "hangeul", 

352 "hanja": "hanja", 

353 "avec clitique": "clitic", 

354 "indéclinable": "indeclinable", 

355 "toponyme": "toponymic", 

356 "applicatif": "applicative", 

357 "causatif": "causative", 

358 "sigle": "abbreviation", 

359 "attributif": "attributive", 

360 "prédicatif": "predicative", 

361 # Template:cy-mut 

362 "non muté": "unmutated", 

363 "lénition": "lenition", 

364 "nasalisation": "nasalization", 

365 "syllabaire": "Syllabics", 

366 "par ellipse": "ellipsis", # Template:ellipse 

367 "ironique": "ironic", 

368 "suffixe": "suffix", 

369 # Template:avk-tab-conjug 

370 "conjugaison présent indicatif": ["present", "indicative"], 

371 # Modèle:de-adjectif-déclinaisons 

372 "déclinaison forte": "strong", 

373 "déclinaison faible": "weak", 

374 "déclinaison mixte": "mixed", 

375 "singulier / pluriel": ["singular", "plural"], 

376 # Template:ja-する 

377 "inaccompli": "uncompleted", 

378 "imperfectif (未然形, mizen-kei)": "imperfective", 

379 "continuatif (連用形, ren'yō-kei)": "continuative", 

380 "conclusif (終止形, shūshi-kei)": "terminal", 

381 "attributif (連体形, rentai-kei)": "attributive", 

382 "hypothétique (仮定形, katei-kei)": "hypothetical", 

383 "impératif (命令形, meirei-kei)": "imperative", 

384 "forme en -te": "gerund", 

385 "désidératif adjectif variable (flexions)": ["desiderative", "adjective"], 

386 # Template:ja-flx-adj-な 

387 "imperfectif (未然形)": "imperfective", 

388 "continuatif (連用形)": "continuative", 

389 "conclusif (終止形)": "terminal", 

390 "attributif (連体形)": "attributive", 

391 "hypothétique (仮定形)": "hypothetical", 

392 "impératif (命令形)": "imperative", 

393 # Template:ko-nom 

394 "avec\nclitique": "clitic", 

395 "thème": "stem", 

396 "nominatif\n/ attributif": ["nominative", "attributive"], 

397 "seulement": "exclusive", 

398 # Template:pt-conj/* 

399 "formas impessoais\n(formes impersonnelles)": "impersonal", 

400 "infinitivo (infinitif)": "infinitive", 

401 "gerúndio (gérondif)": "gerund", 

402 "particípio (participe)": "participle", 

403 "formas pessoais\n(formes personnelles)": "personal", 

404 "singular (singulier)": "singular", 

405 "plural (pluriel)": "plural", 

406 "primeira (première)": "first-person", 

407 "segunda (deuxième)": "second-person", 

408 "terceira (troisième)": "third-person", 

409 "infinitivo pessoal\n(infinitif personnel)": ["infinitive", "personal"], 

410 "modo indicativo (indicatif)": "indicative", 

411 "presente\n(présent)": "present", 

412 "pretérito imperfeito\n(prétérit imparfait)": ["imperfect", "preterite"], 

413 "pretérito perfeito\n(prétérit parfait)": ["perfect", "preterite"], 

414 "pretérito mais-que-perfeito\n(prétérit plus-que-parfait)": [ 

415 "perfect", 

416 "pluperfect", 

417 ], 

418 "futuro do presente\n(futur du présent)": "future", 

419 "futuro do pretérito\n(futur du prétérit)": "conditional", 

420 "modo subjuntivo (conjuntivo) (mode subjonctif)": "subjunctive", 

421 "futuro\n(futur)": "future", 

422 "mode imperativo (impératif)": "imperative", 

423 "afirmativo\n(affirmatif)": "affirmative", 

424 "negativo\n(négatif)": "negative", 

425 "brésilien": "Brazilian", 

426} 

427 

428# template text before gloss 

429SENSE_TAGS: dict[str, str] = { 

430 # https://fr.wiktionary.org/wiki/Modèle:figuré 

431 # https://fr.wiktionary.org/wiki/Catégorie:Modèles_de_relation_entre_les_définitions 

432 # Catégorie:Modèles de genre textuel 

433 # Catégorie:Modèles de registre 

434 "sens figuré": "figuratively", 

435 "sens propre": "literally", 

436 "par métonymie": "metonymically", # Modèle:par métonymie 

437 "par hyperbole": "hyperbole", 

438 "par extension": "broadly", 

439 "par analogie": "analogy", 

440 "en particulier": "especially", 

441 "par litote": "litotes", 

442 "par euphémisme": "euphemism", 

443 "spécifiquement": "specifically", 

444 "génériquement": "generically", 

445 "spécialement": "especially", 

446 "généralement": "generally", 

447 "enclise": "enclitic", 

448 "idiotisme": "idiomatic", 

449 "péjoratif": "pejorative", 

450 "désuet": "obsolete", 

451 "archaïsme": "archaic", 

452 "vieilli": "dated", 

453 "néologisme": "neologism", 

454 "argot": "slang", 

455 "rare": "rare", 

456 # "plus rare": "rare", 

457 "littéraire": "literary", # Modèle:littéraire 

458 "poétique": "poetic", # Modèle:poétique 

459 # "didactique": "", # Modèle:didactique 

460 "soutenu": "formal", # Modèle:soutenu 

461 "informel": "informal", # Modèle:informel 

462 "familier": "familiar", # Modèle:familier 

463 "très familier": "very-familiar", # Modèle:très familier 

464 "populaire": "colloquial", # Modèle:populaire 

465 "vulgaire": "vulgar", # Modèle:vulgaire 

466 "langage enfantin": "childish", # Modèle:enfantin 

467 # Catégorie:Modèles de thématique 

468 "anglicisme informatique": "Anglicism", 

469 "proverbe": "proverb", 

470 "collectivement": "collectively", 

471 "courant": "common", # Modèle:courant 

472 "adjectif attribut": ["adjective", "attributive"], 

473} 

474 

475# https://en.wikipedia.org/wiki/Voice_(grammar) 

476VOICE_TAGS: dict[str, str | list[str]] = { 

477 # https://fr.wiktionary.org/wiki/Modèle:eo-conj 

478 "participe actif": ["participle", "active"], 

479 "participe passif": ["participle", "passive"], 

480 "adverbe actif": ["adverb", "active"], 

481 "adverbe passif": ["adverb", "passive"], 

482 "substantif\nactif": ["subsuntive", "active"], 

483 "substantif\npassif": ["subsuntive", "passive"], 

484 "actif": "active", 

485 "passif": "passive", 

486 "adverbe": "adverb", 

487} 

488 

489# Module:lexique/data 

490LEXIQUE_TAGS = { 

491 "hindouisme": "Hinduism", 

492 "judaïsme": "Judaism", 

493 "marxisme": "Marxism", 

494 "nazisme": "Nazism", 

495 "physique": "physical", 

496 "rhétorique": "rhetoric", 

497 "antiquité": "Ancient", 

498 "antiquité grecque": "Ancient-Greek", 

499 "antiquité romaine": "Ancient-Roman", 

500 "bible": "Biblical", 

501 "moyen âge": "Middle-Ages", 

502 "union européenne": "European-Union", 

503 "analyse": "analytic", 

504} 

505 

506# Template:cmn-pron 

507# https://fr.wiktionary.org/wiki/自由 

508ZH_PRON_TAGS = { 

509 "pinyin": "Pinyin", 

510 "efeo": "EFEO", # https://en.wikipedia.org/wiki/EFEO_Chinese_transcription 

511 "wade-giles": "Wade-Giles", 

512 "yale": "Yale", 

513 "zhuyin": "Bopomofo", 

514 "mandarin": "Mandarin", 

515 "cantonais": "Cantonese", 

516 "cantonais (yue)": "Cantonese", 

517 "jyutping": "Jyutping", 

518 "hakka": "Hakka", 

519 "pha̍k-fa-sṳ": "Phak-fa-su", 

520 "meixian, guangdong": ["Meixian", "Guangdong"], 

521 "jin": "Jin", 

522 "mindong": "Min-Dong", 

523 # https://en.wikipedia.org/wiki/Bàng-uâ-cê 

524 "bàng-uâ-cê (fuzhou)": ["Bang-ua-ce", "Fuzhou"], 

525 "minnan": "Min-Nan", 

526 "pe̍h-ōe-jī (hokkien : fujian, taïwan)": [ 

527 "Peh-oe-ji", 

528 "Hokkien", 

529 "Fujian", 

530 "Taiwan", 

531 ], 

532 "chaozhou, peng'im": ["Chaozhou", "Peng'im"], 

533 "wu": "Wu", 

534 "shanghai": "Shanghai", 

535 "chinois médiéval": "Medieval-Chinese", 

536 "chinois archaïque": "Old-Chinese", 

537 "baxter-sagart": "Baxter-Sagart", 

538 "zhengzhang": "Zhengzhang", 

539} 

540 

541ASPECT_TAGS = { 

542 "perfectif": "perfective", # Modèle:perfectif 

543 "imperfectif": "imperfective", # Modèle:imperfectif 

544} 

545 

546TAGS: dict[str, str | list[str]] = { 

547 **GENDER_TAGS, 

548 **NUMBER_TAGS, 

549 **MOOD_TAGS, 

550 **VERB_FORM_TAGS, 

551 **CASE_TAGS, 

552 **TENSE_TAGS, 

553 **PERSON_TAGS, 

554 **SEMANTICS_TAGS, 

555 **COMPARISON_TAGS, 

556 **OCCITAN_NORM_TAGS, 

557 **BRETON_MUTATION_TAGS, 

558 **JA_TAGS, 

559 **OTHER_GRAMMATICAL_TAGS, 

560 **SENSE_TAGS, 

561 **VOICE_TAGS, 

562 **LEXIQUE_TAGS, 

563 **ZH_PRON_TAGS, 

564 **ASPECT_TAGS, 

565} 

566 

567TOPICS = { 

568 **TOPIC_TAGS, 

569 **SLANG_TOPICS, 

570} 

571 

572 

573def _append(container: list[str], value: str | list[str]) -> None: 

574 if isinstance(value, str): 

575 if value not in container: 575 ↛ exitline 575 didn't return from function '_append' because the condition on line 575 was always true

576 container.append(value) 

577 elif isinstance(value, list): 577 ↛ exitline 577 didn't return from function '_append' because the condition on line 577 was always true

578 for t in value: 

579 if t not in container: 

580 container.append(t) 

581 

582 

583def translate_raw_tags(data: WordEntry) -> WordEntry: 

584 raw_tags = [] 

585 for raw_tag in data.raw_tags: 

586 raw_tag_lower = raw_tag.lower() 

587 if raw_tag_lower in TAGS: 

588 tr_tag = TAGS[raw_tag_lower] 

589 _append(data.tags, tr_tag) 

590 elif raw_tag_lower in TOPICS and hasattr(data, "topics"): 

591 topic = TOPICS[raw_tag_lower] 

592 if isinstance(topic, str): 592 ↛ 594line 592 didn't jump to line 594 because the condition on line 592 was always true

593 _append(data.topics, topic) 

594 elif isinstance(topic, dict): 

595 _append(data.tags, topic["tags"]) 

596 _append(data.topics, topic["topics"]) 

597 else: 

598 raw_tags.append(raw_tag) 

599 data.raw_tags = raw_tags 

600 return data