Repository navigation
記号を含む英字の半角大文字候補を修正 / Fix uppercase candidates with symbols - #1227
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
日本語
問題と原因
:aを入力すると:a/:Aは候補に出る一方、半角大文字の:Aが出ませんでした。英字のみの入力は EnglishEngine でケース候補を生成しますが、記号を含む入力はその分岐を通らず、代替のリテラル候補生成も「ASCII 英字と数字の混在」に限定されていました。全角候補は記号を含む半角 ASCII 全体を対象にしており、この条件差で半角大文字だけが欠落していました。変更
:a→:A、@ab→@AB、a-b→A-B。検証
:aの候補が[:a, :a, :A, :a, :a, :a, :]となり、:Aがないことを回帰テストで再現しました。KanaKanjiConversionSessionParityTest: 18 テスト。ケース候補のテストは 16 入力 × 32 設定(両バックエンド、全 4 問い合わせモード、文節分割 ON/OFF、英語予測 ON/OFF)を確認。KanaKanjiEngineEnglishKanaNumberTest: 11 テスト。EnglishCandidateCaseResolverTest: 3 テスト。ANDROID_HOME=/Users/kazuma/Library/Android/sdk ./gradlew :app:testLiteStandardDebugUnitTest --tests 'com.kazumaproject.markdownhelperkeyboard.converter.session.KanaKanjiConversionSessionParityTest' --tests 'com.kazumaproject.markdownhelperkeyboard.converter.engine.KanaKanjiEngineEnglishKanaNumberTest' --tests 'com.kazumaproject.markdownhelperkeyboard.converter.engine.EnglishCandidateCaseResolverTest' --max-workers=2git diff --check成功。変更は実装と関連テストの 2 ファイルのみで、ログや作業用成果物は含めていません。English
Problem and cause
Typing
:aoffered:a/:A, but omitted the half-width uppercase candidate:A. Letter-only input gets case variants from EnglishEngine. Input containing symbols bypasses that branch, while the literal fallback accepted only mixed ASCII letters and digits. Full-width variants accepted all printable half-width ASCII, causing the mismatch.Changes
:a→:A,@ab→@AB, anda-b→A-B.Validation
:ayielding[:a, :a, :A, :a, :a, :a, :], with no:A.KanaKanjiConversionSessionParityTest: 18 tests. The case-variant test covers 16 inputs × 32 request configurations: both backends, all four query modes, bunsetsu separation on/off, and English prediction on/off.KanaKanjiEngineEnglishKanaNumberTest: 11 tests.EnglishCandidateCaseResolverTest: 3 tests.git diff --checkpassed. Only the implementation and its related test file are changed; no logs or temporary artifacts are included.