NGワードの完全一致・部分一致対応 / Support exact and partial NG word matching - #982
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.
日本語
概要
NGワードごとに部分一致・完全一致を選択できます。部分一致は候補文字列に登録単語が含まれる場合、完全一致は入力の読みと候補文字列が登録した読み・単語の両方に一致する場合に除外します。既存の部分一致の対象範囲と、記号をリテラルとして比較する動作を維持します。
実装
key_definitions.textInputBehavior)を維持し、NGワードのmatchModeは46→47で追加します。DBバージョンは47、既存レコードはPARTIALです。NgWordBackupに集約し、画面と互換性テストで同じ処理を使用します。従来のキーを維持し、方式未指定・null・未知の文字列はPARTIALへフォールバックします。検証
:app:testFullStandardDebugUnitTest: 最終実行で1,464件中1,460件成功・4件スキップ(失敗0)。NGワード関連12件には45→47、46→47、移行後のRoomスキーマ検証、旧JSON・両方式の往復・未知値を含みます。:app:assembleLiteStandardReleaseUnsigned: 成功。R8難読化・リソース縮小・release向けLintを含みます。yomi・tango・matchModeが保持されていることを確認しました。English
Summary
Each NG word supports partial or exact matching. Partial matching blocks candidates containing the registered word; exact matching requires both the input reading and candidate text to match the registered pair. Existing partial-match filtering scope and literal treatment of symbols are preserved.
Implementation
key_definitions.textInputBehavior; add NG wordmatchModein 46→47. The database version is 47 and existing records default toPARTIAL.PARTIAL.Validation
:app:testFullStandardDebugUnitTest: final run: 1,464 tests, 1,460 passed, 4 skipped, zero failures. The 12 NG word tests cover 45→47, 46→47, Room schema validation after migration, legacy JSON, both modes, and unknown values.:app:assembleLiteStandardReleaseUnsigned: passed, including R8 minification, resource shrinking, and release lint.yomi,tango, andmatchMode.