Skip to content

Commit dcc3727

Browse files
BonoJoviclaude
andcommitted
fix(dict): surface 料理 and 鍵 buried below rare homophones
The conversion-quality suite flagged two everyday nouns losing the cold-start tie to rarer same-reading kanji: 料理 (3968) sat below 良吏 (4296, archaic "good official") and 鍵 (4119) just below 鈎 (4124, rare "hook/gaff"). Add both to PRIORITY_OVERRIDES (料理 4400, 鍵 4200) and extend the hermetic guard. Live (1.5B) end-to-end: case_0032 料理を作る now correct; case_0034's noun resolves to 鍵 (was 鈎). The residual 探す→捜す is a genuine near-synonym LLM flip on correct context, and 神/髪 (case_0030) stays context-dependent — both deliberately left to the LLM, not force-ordered. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9acc4aa commit dcc3727

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/core/dictionary/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ const PRIORITY_OVERRIDES: &[(&str, &str, u32)] = &[
126126
("かわ", "川", 3900), // was 1150, below 皮 3755
127127
("かみ", "髪", 4000), // was 3300, below 加味 3609
128128
("かみ", "神", 3800), // was 3065, below 加味 3609 (髪 > 神 kept)
129+
("りょうり", "料理", 4400), // was 3968, below 良吏 4296 (rare "good official")
130+
("かぎ", "鍵", 4200), // was 4119, below 鈎 4124 (rare "hook/gaff")
129131
// Verbs: the everyday default buried below rare/literary kanji variants.
130132
// Same exclusion rule — context-dependent verbs (着る/切る, 図る/測る,
131133
// 上る/登る, 治す/直す, 帰る/変える) are left to the LLM.
@@ -1013,8 +1015,10 @@ mod tests {
10131015
("みち", "道"), // beats 未知
10141016
("うみ", "海"), // beats 生み/膿/産み
10151017
("め", "目"), // beats 眼/海布
1016-
("かわ", "川"), // beats 皮
1017-
("かみ", "髪"), // beats 加味
1018+
("かわ", "川"), // beats 皮
1019+
("かみ", "髪"), // beats 加味
1020+
("りょうり", "料理"), // beats 良吏
1021+
("かぎ", "鍵"), // beats 鈎
10181022
// verbs
10191023
("みる", "見る"), // beats 海松/水松
10201024
("いのる", "祈る"), // beats 祷る

0 commit comments

Comments
 (0)