predict_output_word
(context_words_list, topn=10)>> Report the probability distribution of the center word given the context words as input to the trained model.
Thank you very much for your reply and for the link to the source of that method. I will definitely take a look.However, I do hope you can help clarify one thing I am confused on:>> But it's important to note:>> * these models aren't necessarily very good at such center-word predictions.Quite interesting, as to my understanding, the point of choosing CBOW or SG algorithm was how word vectors would be generated (all best explained in the famous "the quick brown fox jumps over the lazy dog" example with window size of 2):
SG: the input is the center word, while the outputs are the context words surrounding the center wordEXP: the quick brown fox jumps over the lazy dog -> (brown, the); (brown, quick); (brown,fox); (brown, jumps)CBOW: the input is context words surrounding the target word, which is the outputEXP: the quick brown fox jumps over the lazy dog -> (the quick fox jumps, brown)
Unless I am missing something, isn't that why we specify either CBOW or SG during training, and why it should be good at predicting a target word?
Otherwise, why does gensim's own word2vec still include it if by your own admission "It's likely that even more-simple cooccurrence tables could give better predictions"? I understand that without a significant number of samples that the target word predictions wouldn't be perfect, but I thought it still seems useful to include since fasttext is supposed to be an extension of word2vec, which leaves me curious as to why predict_output_word still exists in one, but was removed from the other..