I tried to load fastText pretrained model from here Fasttext model. I am using wiki.simple.en
from gensim.models.keyedvectors import KeyedVectors
word_vectors = KeyedVectors.load_word2vec_format('wiki.simple.bin', binary=True)
But, it shows the following errors
Traceback (most recent call last):
File "nltk_check.py", line 28, in <module>
word_vectors = KeyedVectors.load_word2vec_format('wiki.simple.bin', binary=True)
File "P:\major_project\venv\lib\sitepackages\gensim\models\keyedvectors.py",line 206, in load_word2vec_format
header = utils.to_unicode(fin.readline(), encoding=encoding)
File "P:\major_project\venv\lib\site-packages\gensim\utils.py", line 235, in any2unicode
return unicode(text, encoding, errors=errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 0: invalid start byte
Question 1 How do I load fasttext model with Gensim?
Question 2 Also, after loading the model, I want to find the similarity between two words
model.find_similarity('teacher', 'teaches')
# Something like this
Output : 0.99
How do I do this?
fasttext
library directly, since I really just needed the words to get transformed $\endgroup$