New issue
Advanced search Search tips

Issue 873311 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Spellchecker map lookup is case sensitive

Project Member Reported by diegomtzg@google.com, Aug 10

Issue description

When 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.
 
Labels: Hotlist-GoodFirstBug
Status: Available (was: Untriaged)
Thanks for filing :-)

One possible proposed fix: store just the lower-case when building the dictionary, and convert each word to lower-case when doing the dictionary lookup.
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Owner: qyears...@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment