Closed
Bug 1048792
Opened 10 years ago
Closed 10 years ago
Keyboard should not autocorrect words with different char count than input
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(b2g-v2.2 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
b2g-v2.2 | --- | fixed |
People
(Reporter: janjongboom, Assigned: janjongboom)
References
Details
Attachments
(1 file, 1 obsolete file)
Related bugs: bug 971688 and bug 981602 After working with FFOS 2.0 for a while again I see that a lot of my annoyances with autocorrect come from the fact that it suggests words with a different char count than my input. I think that in 90% of the time that's not correct behavior. So I suggest to never autocorrect words that have a char count mismatch with the input. We can do suggestions of course.
Assignee | ||
Updated•10 years ago
|
Summary: Keyboard should not suggest words with different char count than input → Keyboard should not autocorrect words with different char count than input
Assignee | ||
Comment 1•10 years ago
|
||
Just counting \w, so we can still do stuff like dont -> don't
Assignee: nobody → janjongboom
Attachment #8467641 -
Flags: review?(dflanagan)
Comment 2•10 years ago
|
||
Comment on attachment 8467641 [details] [review] Patch From a technical standpoint, I'd move the regexp matching code into the if statement so that we don't have to run the regexps if we're not going to autocorrect for other reasons. But r- here because I suspect that requiring an exact match is too strict. How about allowing +/- 1 for the lengths? That would still prevent obviously bad things like asjan->ashanti (as you point out in bug 981602) but would allow correction of spelling errors like Folow->Follow Can we try out a less severe change first?
Attachment #8467641 -
Flags: review?(dflanagan) → review-
Comment 3•10 years ago
|
||
Also note that if we allowed a +/- 1 difference in length then no special case would be required for English contractions and we wouldn't have to run a regexp over both strings.
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to David Flanagan [:djf] from comment #2) > Comment on attachment 8467641 [details] [review] > Patch > > From a technical standpoint, I'd move the regexp matching code into the if > statement so that we don't have to run the regexps if we're not going to > autocorrect for other reasons. > > But r- here because I suspect that requiring an exact match is too strict. > How about allowing +/- 1 for the lengths? That would still prevent obviously > bad things like asjan->ashanti (as you point out in bug 981602) but would > allow correction of spelling errors like Folow->Follow > > Can we try out a less severe change first? Yeah, makes sense. Android does it more or less this way. Although they take frequency into account as well. F.e. 'Folow' -> 'Follow', but 'Zoolgy' does not autocorrect to 'Zoology'.
Flags: needinfo?(dflanagan)
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8467641 [details] [review] Patch Alright, I changed it around a bit. Length diff = 0 -> Always OK Length diff >= 2 -> Always NOK Length diff = 1 -> OK if freq is over 5 That should do the trick, Follow is f.e. 6.2.
Attachment #8467641 -
Flags: review- → review?(dflanagan)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(dflanagan)
Comment 6•10 years ago
|
||
Comment on attachment 8467641 [details] [review] Patch Looks good to me, but note that I think Tim has recently removed all the const keywords, so this can run in regular web browsers. So you might need to update the patch to use var instead of const. Sorry this review took so long.
Attachment #8467641 -
Flags: review?(dflanagan) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Changed const -> var and landed @ https://github.com/mozilla-b2g/gaia/commit/694f5b760eed6104eb536824af2a8546cfdd94bf
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 8•10 years ago
|
||
Backed out for causing Gip errors like: https://tbpl.mozilla.org/php/getParsedLog.php?id=47179302&tree=B2g-Inbound These were also present in the gaia-try run: https://tbpl.mozilla.org/?rev=7b3c14a3fa0906728730c6900b30a1364efc8833&tree=Gaia-Try https://github.com/mozilla-b2g/gaia/commit/000e17ab3f3e67b40333a4baf70e5aea9a6a2205
Status: RESOLVED → REOPENED
Flags: needinfo?(janjongboom)
Resolution: FIXED → ---
Assignee | ||
Comment 9•10 years ago
|
||
But that's an intermittent with a bug report et al, or is it persistent?
Flags: needinfo?(kgrandon)
Assignee | ||
Comment 10•10 years ago
|
||
Hjm, seems persistent. Not good. My bad.
Flags: needinfo?(kgrandon)
Comment 11•10 years ago
|
||
Appears this may have been falsely blamed as this failure persists on b-i. Investigating, and if it's not the cause we can re-land.
Comment 12•10 years ago
|
||
Link to the run that caused suspicion: https://tbpl.mozilla.org/?tree=B2g-Inbound&rev=60b912f25bb1 Previous run did not fail: https://tbpl.mozilla.org/?tree=B2g-Inbound&rev=d7b09cebc099
Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8467641 -
Attachment is obsolete: true
Attachment #8482810 -
Flags: review+
Assignee | ||
Comment 14•10 years ago
|
||
@Kevin, test failure was correct. Thanks for backing out.
Flags: needinfo?(janjongboom)
Assignee | ||
Comment 15•10 years ago
|
||
Try is green https://tbpl.mozilla.org/?rev=c30d741555c9ff88a33319d0bba7e0c244207656&tree=Gaia-Try Relanded https://github.com/mozilla-b2g/gaia/commit/8426fcaa2faced24558c8d8e4503771373c0a2fa
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
status-b2g-v2.2:
--- → fixed
Comment 16•10 years ago
|
||
Jan, With this change, "keyboard" won't be shown as a suggestion, when you type "keyboa" but will be when you type "keyboar". Is this as expected?
Flags: needinfo?(janjongboom)
Assignee | ||
Comment 17•10 years ago
|
||
Nope, but this is not the culprit, I would earlier suspect that changing bug 1048869 makes us hit bug 971688, but let me check when I get in the office.
Flags: needinfo?(rlu)
Assignee | ||
Comment 19•10 years ago
|
||
I created https://bugzilla.mozilla.org/show_bug.cgi?id=1072880
Flags: needinfo?(janjongboom)
You need to log in
before you can comment on or make changes to this bug.
Description
•