Skip to content

英語予測で単語候補を優先 / Rank English word completions before phrases - #1272

Merged
KazumaProject merged 1 commit into
devfrom
codex/english-prediction-ranking
Nov 9, 2026
Merged

KazumaProject merged 1 commit into
devfrom
codex/english-prediction-ranking

Conversation

@KazumaProject

Copy link
Copy Markdown
Owner

日本語

英語予測で空白をまだ入力していないときは、単語候補を未完の複数語フレーズより先に表示します。登録フレーズ用の候補枠も残します。

従来は空白なしの入力を辞書の複数語表記に照合し、フレーズの先頭語を入力済みと判定すると単語の辞書コストにかかわらずフレーズを優先していました。たとえば ja は j a… と照合され、コスト 6000 の J and C Carmichael がコスト 1600 の Java より先に出ていました。

入力 修正前の候補順 修正後の候補順
ja 2番目 J and C Carmichael 2番目 Java、14番目 J and C Carmichael
auto 2番目 Auto 5000、3番目 auto loan 2〜5番目 AutoCAD、autocorrect、automatically、automatic。14・15番目 Auto 5000、auto loan

auto l のように空白を入力した場合はフレーズを優先できます。autoloan のように登録フレーズの文字をすべて入力した場合も、auto loan を選べます。

English

For input without spaces, English prediction now lists standalone word candidates before unfinished multiword phrases and retains slots for registered phrases farther down the list.

Previously, the matcher could infer a word boundary from unspaced input. Once it considered the first word of a registered phrase fully typed, it promoted the phrase ahead of word completions regardless of dictionary cost. For example, ja matched j a…, so J and C Carmichael at cost 6000 outranked Java at cost 1600.

Input Before After
ja #2 J and C Carmichael #2 Java, #14 J and C Carmichael
auto #2 Auto 5000, #3 auto loan #2–5 AutoCAD, autocorrect, automatically, automatic. #14–15 Auto 5000, auto loan

Typing a space, as in auto l, can still put auto loan near the top. Fully typed registered aliases such as autoloan still offer the spaced spelling auto loan.

検証 / Verification

  • Pixel 6 の Lite Standard Debug で修正前後の QWERTY 英語候補を比較。修正後は候補タブとライブ変換を有効にした設定でも ja と auto の並びを確認。 Compared the actual English QWERTY candidate strip before and after on a Pixel 6 running Lite Standard Debug. Also checked ja and auto with candidate tabs and live conversion enabled.
  • 英語フレーズの計装テスト16件と、大文字・小文字および文法辞書のユニットテスト7件が通過。 Passed 16 English phrase instrumentation tests and 7 unit tests for case handling and grammar roles.

@KazumaProject
KazumaProject merged commit 9b6a2c9 into dev Nov 9, 2026
1 check passed
@KazumaProject
KazumaProject deleted the codex/english-prediction-ranking branch November 9, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant