Spellchecker map lookup is case sensitive |
||
Issue descriptionWhen we check for misspellings, the map lookup is case-sensitive (e.g. "Prind" doesn't get flagged but "prind" does). My thinking is that we could extract a helper function to check the actual word plus both the all lower-case and all upper-case variants of said word against the dictionary map.
,
Aug 13
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/42ddd4174e7412360f17c5902bbe8067bf200eca commit 42ddd4174e7412360f17c5902bbe8067bf200eca Author: Quinten Yearsley <qyearsley@chromium.org> Date: Mon Aug 13 17:34:10 2018 [tricium spellchecker] Case-insensitive flagging and suggestions This change would allow flagging misspellings regardless of case. This is done by setting all dictionary keys to lower-case, and lower-casing words when looking up in the dictinoary. In order to give better suggestions, however, the case of the proposed fix should ideally match the mispelling; for example, if the misspelling was "Occurences", then the proposed fix should be "Occurrences", not "occurrences" -- so, this CL also converts the list of fixes to match the misspelling. Bug: 873311 Change-Id: Ie00117ca38cd53cf7331a25a367a33931c394a10 Reviewed-on: https://chromium-review.googlesource.com/1172101 Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org> Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> [modify] https://crrev.com/42ddd4174e7412360f17c5902bbe8067bf200eca/go/src/infra/tricium/functions/spellchecker/spellchecker_test.go [modify] https://crrev.com/42ddd4174e7412360f17c5902bbe8067bf200eca/go/src/infra/tricium/functions/spellchecker/spellchecker.go
,
Aug 13
|
||
►
Sign in to add a comment |
||
Comment 1 by qyears...@chromium.org
, Aug 10Status: Available (was: Untriaged)