Closed
Bug 878386
Opened 12 years ago
Closed 12 years ago
[keyboard] when no auto corrections are found try harder
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(b2g18 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
b2g18 | --- | fixed |
People
(Reporter: djf, Assigned: djf)
References
Details
Attachments
(1 file)
For speed, the prediction engine does a fairly quick and constrained search for corrections. It has been refactored to be interruptable, however, so when it fails to find any suggestions, we might as well go ahead and ask it to try again, but look harder this time.
Assignee | ||
Comment 1•12 years ago
|
||
I'm removing this from the list of bugs blocking bug 797170. I'll create the simple patch described here if, in testing, we find that there are words where the desired suggestion is not coming out correctly.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → dflanagan
Assignee | ||
Comment 2•12 years ago
|
||
This patch modifies worker.js so that if the first call to predict() doesn't return any suggetions, it tries again, but search for words with edit distance 2 instead of edit distance 1.
There are chagned in predictions.js to make predict() configurable this way.
The results are really good. We can now make corrections like caebations->carnations and teatinf->testing. The initial search for caebations takes ~20ms, and the deeper search takes 120ms. The initial search for teating takes 24ms and the deeper search takes 86ms. So I think this new strategy of a shallow search followed by a deep search totally wins.
I wish I'd done it a long time ago!
Attachment #758909 -
Flags: review?(eshapiro)
Attachment #758909 -
Flags: review?(eshapiro) → review+
Assignee | ||
Comment 3•12 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•