Currently, our predictive-text engine operates by searching for the next best available text correction, then seeing what words may be predicted from that. Note - the search optimizes solely by the correction cost, and we build predictions off of that.
However, our correction-search objects actively track the LexiconTraversal corresponding to their represented correction. That same object can be used as a very informed guess for the maximum suggestion probability for its corresponding correction. If we were to include this in the criteria used for correction-search, we could better prioritize cases where the predicted word is likely despite higher-cost corrections - such as with transpositions.
This could allow us to improve our correction-cost threshold loosening, wasting less time and energy on searches in certain cases. In particular, this would let us reverse a change made in #16450 that lowered the threshold due to the "correction search" limitation - "teh" wasn't being corrected due to an overly strict threshold - one that could not be mitigated by "the"'s high word frequency.
Currently, our predictive-text engine operates by searching for the next best available text correction, then seeing what words may be predicted from that. Note - the search optimizes solely by the correction cost, and we build predictions off of that.
However, our correction-search objects actively track the
LexiconTraversalcorresponding to their represented correction. That same object can be used as a very informed guess for the maximum suggestion probability for its corresponding correction. If we were to include this in the criteria used for correction-search, we could better prioritize cases where the predicted word is likely despite higher-cost corrections - such as with transpositions.This could allow us to improve our correction-cost threshold loosening, wasting less time and energy on searches in certain cases. In particular, this would let us reverse a change made in #16450 that lowered the threshold due to the "correction search" limitation - "teh" wasn't being corrected due to an overly strict threshold - one that could not be mitigated by "the"'s high word frequency.