[PPM] Nearly impossible to type low-probability letters
(From Jim)
The predictor supplies a weight value for each next character that it predicts. If it returns tiny weights for unpredicted characters, and big weights for strongly predicted characters, the boxes for unpredicted characters come out tiny.
You could make either of the following changes, for example:
- Only return a weight for, say, the 20 most likely characters. Leave everything else with a default weight of one.
- Impose a minimum weight. If the prediction algorithm would return a weight below the minimum, return the minimum instead.
Short term, have hard-coded constant values for 20 or the minimum weight.
Long term, the constant should move to the control panel object, and the predictor should have an initialisation step in which it gets a reference to the control panel.
I should probably take this one and provide an interim solution.
Just an update. Sasha is a bit tied up so it’s up for anyone to fix. “ The problem is really between the LM and the UI in the predictor, as Jim describes in the respective redash issue #58 . We need someone to fix that Javascript code that re-weights the predictions and sets them using set_weight. The code is here.
This is the same code I am working on to integrate mozolm and dasher- I'll be reviewing this code this week. Confidence level of fixing this problem it not high, but will see what I can do. Agree that this and #58 are related- and cleaning up this area would be helpful for others to integrate additional language models.