Closed Bug 1072880 Opened 11 years ago Closed 11 years ago

Keyboa should suggest Keyboard

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janjongboom, Assigned: janjongboom)

Details

Attachments

(1 file)

From https://bugzilla.mozilla.org/show_bug.cgi?id=1048792#c16 We have a weird case where 'keyboa' doesn't yield any suggestions but 'keybo' and 'keyboar' do. Upping the search limit in worker.js doesn't help either. Need to investigate.
Attached patch PatchSplinter Review
Alright, so what went wrong was: - Keyboard is in the candidates list with 2.8 weight - We have more candidates because we value horizontal aligned keys better now - All of these candidates have corrections=1 but a higher weight because their freq is high So we should give a little bump to candidates with corrections 0. I did this based on the frequency (freq/32 * 10), because we don't want to break things like 'kn' which should return 'km' and not 'know'.
Attachment #8495206 - Flags: review?(dflanagan)
(So the queue fills up, is bounded, and bumps keyboard off the list, even though later on it would still be returned as a suggestion, because it's the best match)
Comment on attachment 8495206 [details] [diff] [review] Patch I pinged djf last week, but still no review. Can you look at the results this patch produces and see if youre OK with it?
Attachment #8495206 - Flags: review?(dflanagan) → review?(rlu)
Comment on attachment 8495206 [details] [diff] [review] Patch This patch looks simple enough for boosting up the weight for this case. Mind to add more explanation why (freq/32 * 10), seems like magic number to me. Thanks.
Attachment #8495206 - Flags: review?(rlu) → review+
It is somewhat of a random number. It provides enough boost (4-6) for the words that are relative frequent like keyboard, it doesn't have too much effect (<1) for words that have super low freq. And it didn't break any of my edge cases. It could have been 9 or 11 as well tbh.
Integration tests busted (intermittent?). Restarted them.
Flags: needinfo?(janjongboom)
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(janjongboom)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: