feat(seed): HNC frequency rank + merge duplicate dictionary entries #23
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
project-halkyon/halkyon-curator!23
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/23/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two curator-side fixes for Greek vocabulary quality.
1. Frequency rank (most-common-first ordering)
HncLemmaBulks.rankFor(word)→ 1-based position in the master HNC list (rank <= band; null when unlisted). Stamped ashnc_rankbyBilingualSeed;backfill_hnc_ranksets it on already-seeded rows via full-row merge-upsert. The server RPC staggersdue_atby this so bulk-added cards are introduced most-common-first. (Backfilled live: 24,087 ranked.)2. Merge duplicate (expression, reading) entries
The bilingual source splits one headword into several rows (one per sense-block / part of speech) — e.g. κάποιος as adjective "irgendein" AND pronoun "jemand", or κάνω's 9 senses across two rows. Bulk-add de-dups cards by (expression, reading), so only one split row became a card and the others' meanings were silently dropped; it also made the catalog count exceed the cards actually added (518 vs 505).
mergeDuplicateEntries/mergeEntryGroupcollapse rows sharing (expression, reading), unioningmeanings/senses/pos(richest row leads → primary meaning first;commonOR-ed, most-elementaryjlpt, smallesthnc_rank). Applied inBilingualSeed.rowsForLine(future seeds clean) and exposed via a newdedup_dictionary_entriesCLI to fix the live catalog in place (PATCH survivor, delete the rest; small delete chunks to avoid HTTP 414).Applied to the live el catalog: 539 groups merged, 546 rows removed (37,945 → 37,399). Top-500 count is now 505 = cards added; κάνω carries all 9 meanings; re-run finds 0 duplicates.
Verification
dart analyzeclean;dart testgreen (153 tests) incl.rankForandmergeEntryGroup/mergeDuplicateEntriescases (union meanings richest-first, distinct pos, OR common, min rank, different readings not merged, seeder applies the merge).