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:
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.