I have a language model, and I want to obtain the list of alternative words
(along with their scores) when I input a phrase.
For instance, if I feed in the word "Good" in a n-gram language model, it
outputs possible next words as "Morning", "Afternoon", "Evening", "Night",
etc. in a "conversations-based" language model.
Would anyone know how to do that?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
And please next time when you post something try to select a more descriptive
subject. Something like "Prediction of most probable following word with a
language model" is way better name of the topic than "Language Model".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a language model, and I want to obtain the list of alternative words
(along with their scores) when I input a phrase.
For instance, if I feed in the word "Good" in a n-gram language model, it
outputs possible next words as "Morning", "Afternoon", "Evening", "Night",
etc. in a "conversations-based" language model.
Would anyone know how to do that?
The algorithm to select this is trivial, you just check all possible word
combinations and select the best follower
If you want to do this quickly and repeatedly, you need to precompile this
information into a separate structure.
And please next time when you post something try to select a more descriptive
subject. Something like "Prediction of most probable following word with a
language model" is way better name of the topic than "Language Model".