Closed Bug 1048869 Opened 7 years ago Closed 7 years ago
Keyboard autosuggest nearby keys algorithm doesn't value vertical alignment enough
In the nearby keys algorithm keys that are horizontal adjacent next to each other are valued way higher than vertical. This is why we get suggestions like this (from bug 981602): INPUT SUGGESTION SHOULD BE ============================================== kn km* in* (because in has freq 210, km has 155) asjan Ashanti* Asian (126 vs 77, plus word length mismatch) flr DLR* for* (196 vs 83) We should fix the nearby keys algorithm so it has these cases correct.
Assignee: nobody → janjongboom
Another one in the series. This patch values keys that are vertically stacked a bit more. The problem is that the difference between horizontal and vertical keys in value is too much. E.g. distance between F & G is 0.70, and between F & C 0.27. Even though they're both adjacent to F. The difference between F & T then almost doesn't differ from C, with only 0.25. Because we treat this value as a direct multiplier to matches, matches with horizontal key get a way too high valuation leading to the errors in the description. The reason for this is that we measure the delta between the center of the keys, and as a key is higher than wider we get this unfair penalty. Should normalize the delta in both ways, which is what this patch does. With this patch, the values for 'F' are: G 0.70 C 0.49 T 0.42 Which is more reasonable I think.
Attachment #8468373 - Flags: review?(dflanagan)
Comment on attachment 8468373 [details] [review] Patch I don't have time to test this out myself, but if you think it gives better corrections, let's go with it. But please add a comment to your patch explaining why you're adjusting dy and the mathematical justification for that particular adjustment.
Attachment #8468373 - Flags: review?(dflanagan) → review+
Comment on attachment 8468373 [details] [review] Patch Rudy, can you give feedback on this before I land it?
Attachment #8468373 - Flags: feedback?(rlu)
Comment on attachment 8468373 [details] [review] Patch I'm fine with this change and tested it on the phone. Thanks.
Attachment #8468373 - Flags: feedback?(rlu) → feedback+
Try green https://tbpl.mozilla.org/?rev=0edf84c26ee82d67995b4f321ba83406376a3616&tree=Gaia-Try Landed https://github.com/mozilla-b2g/gaia/commit/899c8bf56fad8e418f3de24dc0f73c3d4a25b3d0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.