The examples (related to word representations) on fasttext official web site (fasttext.cc) suggest that it is possible to calculate the nearest neighbors on vectors derived with cbow (or skip-gram model) (in short, on unsupervised learning models). It is stated that this can be done using the get_nearest_neighbors
function on the model (model.get_nearest_neighbors
). However, when I tried to do that Python (3.7.) it shows me the message that this function does not exist in fasttext for unspervised learning models, and indeed when I look at the fasttext help, I do not see that this function. The only similar function that exists is a predicate on model (model.predict
(where k is specified)), however this can only be done on a supervised learning models.
Can anyone explain to me what's going on, and help me with this? And is there any way to calculate nearest neighbors for unspervised learning models in fasttext? :-)