Hello! I am looking for a tiny model to help choose one word from list to finish sentence

I am developing a helper application for disabled people to enter text alternate way (not via keyboard)
user enters main letters of word (like ‘knlg’ for knowledge) via joystick and my app chooses the most probable word. but sometimes there are few possible words.
I tried asking chatgpt like this:

Please answer to the following question.  More appropriate word to use instead of [MASK] in unfinished  sentence "located at the [MASK]": 'main' or 'gain'?

or
Please answer to the following question. More appropriate word to use instead of [MASK] in unfinished sentence “nowhere [MASK]”: ‘near’ or ‘bear’?

and it correctly chooses a word
I cant find a model there which would be fit to said task of choosing a word (from a given set) to continue sentence and also wonder how to run any model from here locally and what will be requirements?