thanks
For python, you can use the fasttext module
pip install fasttext
example to load the model:
import fasttext
# Load Skipgram or CBOW model
model = fasttext.load_model('model.bin')
# print some word vector
print model['king']
# Or load pre-trained classifier
classifier = fasttext.load_model('model.bin', label_prefix='__label__')
# To predict k-best labels from texts
classifier.predict(texts, k=3)
Link to the github repo: https://github.com/salestock/fastText.py
thanks very much
If having a C++ interface?
Thanks.
I wanted to leave a note here that the python library no long works with pre-trained word embeddings trained from Wikipedia:
Most helpful comment
For python, you can use the
fasttextmoduleexample to load the model:
Link to the github repo: https://github.com/salestock/fastText.py