openboard-team / openboard

GNU General Public License v3.0
2.59k stars 254 forks source link

Hidden Markov Model for better autocomplete suggestions #627

Open omarandlorraine opened 2 years ago

omarandlorraine commented 2 years ago

Is your feature request related to a problem? Please describe. Especially in languages with a lot of inflectional material at the end of some words, the autocomplete suggestions are grammatically wrong. This is a slight problem when writing English. For example, you type in She wri and openboard will suggest words starting with wri, such as writer, written, write, writes, writing. But one of these candidates is a much better fit than any other

That's because She, being a subject pronoun, is much more likely to be immediate followed by a verb (the disqualifies writer). This verb is likely to be finite (disqualify written and writing), If the verb is finite, then it must agree with the subject, (therefore disqualify write).

Describe the solution you'd like I would like the autocomplete suggestions to be better selected by use of contextual clues. This could be achieved by a hidden markov model for part-of-speech tagging, let's take the CLAWS7 tagset as an example.

Describe alternatives you've considered I just muddle on. Every now and again I consider going to another keyboard software, but in the main I like this one.

Extra notes It is worth noting that other languages suffer much worse from this with OpenBoard. Of the languages I know, Russian in particular has enough endings to render the autocomplete useless. Maybe I just haven't trained it enough yet.

MajeurAndroid commented 2 years ago

I agree with you, and markov models could be a solution to this. Would you be able to produce a POC ? So we would be able to evaluate its potential.