Repository navigation
fix(suggest): keep the dictionary's "I" for a typed "i" (#961) - #964
Merged
Merged
Conversation
Since v4.3.7 title case candidates are dropped when their lowercase form is the typed word or another candidate (#914), so "Of" does not replace "of". That also dropped "I", the dictionary's whitelist correction for "i", whenever lowercase "i" counted as valid or was a candidate (e.g. learned once), so auto-correct left "i" lowercase. Whitelist candidates are corrections the dictionary asks for and are kept now. Reproduced on Waydroid with the English dictionary and auto-correct on: "so i think" stayed lowercase before, and becomes "so I think" now.
4 tasks done
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.
Fixes #961
Cause
Suggest.removeTitleCaseVariants(#914, in v4.3.7) drops title case candidates whose lowercase form is the typed word or another candidate, so "Of" does not replace a typed "of". It also dropped "I", the dictionary's whitelist correction (KIND_WHITELIST) for "i", whenever lowercase "i" counted as valid or was a candidate (for example after being learned once). Auto-correct then had nothing to correct "i" to.Fix
Whitelist candidates are kept: they are corrections the dictionary explicitly asks for. Normal title case duplicates ("Of", "If") are still dropped.
Testing
SuggestTestcase for "i" with "I" (whitelist) and a lowercase "i" candidate;SuggestTest33, 0 failures.assembleStandardDebugbuilds.