diff --git a/api/scripts/import_dictionary.py b/api/scripts/import_dictionary.py index f9a0e06..579da21 100644 --- a/api/scripts/import_dictionary.py +++ b/api/scripts/import_dictionary.py @@ -278,6 +278,20 @@ def _parse_entry(record: dict, lang_code: str) -> dict | None: } ) + # Verbs have a dedicated kaikki entry for each conjugated form (including + # the infinitive itself), so the headword is already covered. For all other + # POS (nouns, adjectives, …) no such entry exists, so we add the headword + # form explicitly here. + if pos_raw != "verb": + wordforms.append( + { + "id": _wordform_uuid(lemma_id, word, []), + "lemma_id": lemma_id, + "form": word, + "tags": [], + } + ) + return { "lemma": { "id": lemma_id,