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:
parent
c9dd9d0b4c
commit
612c33ba93
1 changed files with 14 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue