You remember T9, right?
This was the "predictive text" algorithm used mainly by cell phones in the 90's and 00's that allowed you to type on 12 buttons, while maintaining a keystroke-to-valid-character-input ratio of close to 1.
Basically, T9 searches through the combinations of letters tied to keypad sequences and looks for valid words/prefixes.
So if you typed: 2-3-3-7, the algo would have to search for words in:
[A,B,C][D,E,F][D,E,F][P,Q,R,S]
If you're lucky, you'll have typed: beer
But if for some reason, that's not what you were going for, you can hit the "cycle" key and the algo will swap out "beer" for "beep", and then maybe "bees".
Here's a clip of me typing the word "actually". You can see the word replacements happening in real-time.
As a poor typist I wonder if a list of Python (or other language) words would be a good use for this project? The word list is not massive. I will look at your library generator ans see if there are any issues.