Catalog: emit per-sense metadata (pos/misc/field/dialect) for the dictionary #10

Merged
raisondetredev merged 1 commit from refs/pull/10/head into main 2026-06-07 11:33:47 +02:00
raisondetredev commented 2026-06-07 11:33:38 +02:00 (Migrated from codeberg.org)

JMdict carries, per sense, its own part-of-speech (incl. verb class +
transitivity), misc tags (uk "usually kana", honorific, archaic, …),
field, and dialect. The seed discarded all of it — flattening to a
distinct-glosses meanings list and a whole-word pos[] (which even
collapses vi/vt to just "verb"). So the rich per-meaning breakdown a
learner sees on Jisho/PONS was unrecoverable downstream.

  • Parse misc / field / dialect per sense in jmdict_simplified.
  • Add sensesOf(word) to the shared extraction: one object per sense
    with its glosses + raw JMdict codes ({glosses, pos?, misc?, field?, dialect?}), glossless senses dropped, empty code arrays omitted.
  • Emit senses on the dictionary_entries seed row, alongside the
    unchanged flat meanings / pos mirrors.

Raw codes are kept (not resolved labels) so the client owns the
presentation and can change it without a re-seed. Pairs with the
halkyon-infra migration adding the nullable senses JSONB column.

Signed-off-by: Tizian 「ティツィアーン」 raisondetredev@pm.me

JMdict carries, per sense, its own part-of-speech (incl. verb class + transitivity), misc tags (uk "usually kana", honorific, archaic, …), field, and dialect. The seed discarded all of it — flattening to a distinct-glosses `meanings` list and a whole-word `pos[]` (which even collapses vi/vt to just "verb"). So the rich per-meaning breakdown a learner sees on Jisho/PONS was unrecoverable downstream. - Parse `misc` / `field` / `dialect` per sense in jmdict_simplified. - Add `sensesOf(word)` to the shared extraction: one object per sense with its glosses + raw JMdict codes (`{glosses, pos?, misc?, field?, dialect?}`), glossless senses dropped, empty code arrays omitted. - Emit `senses` on the dictionary_entries seed row, alongside the unchanged flat `meanings` / `pos` mirrors. Raw codes are kept (not resolved labels) so the client owns the presentation and can change it without a re-seed. Pairs with the halkyon-infra migration adding the nullable `senses` JSONB column. Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-curator!10
No description provided.