feat: [script] Fix how non-verb words are imported, as they were missing

a wordform entry for the "default" lemma (i.e. masculine, singular form)
This commit is contained in:
wilson 2026-04-18 17:27:32 +01:00
parent c9dd9d0b4c
commit 612c33ba93

View file

@ -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,