I use FastText to generate the word embedding. I download the pre-trained model from https://fasttext.cc/docs/en/crawl-vectors.html The model has 300 dimensions but I want 100 dimensions so I use reduce model command but I got an error
import gensimmodel = gensim.models.fasttext.FastText.load_fasttext_format('cc.th.300.bin')gensim.models.fasttext.utils.reduce_model(model, 100)
I got AttributeError: module 'gensim.utils' has no attribute 'reduce_model'
Heres are the code from FastText docs
import fasttextimport fasttext.utilft = fasttext.load_model('cc.en.300.bin')fasttext.util.reduce_model(ft, 100)
How to fix this error, I cannot find any docs for the new command.
Thank you