Questions tagged [fasttext]

fastText is a library for efficient learning of word representations and sentence classification.

fastText is a library for efficient learning of word representations and sentence classification. See https://github.com/facebookresearch/fastText for more information.

465 questions
25
votes
2 answers

Difference between Fasttext .vec and .bin file

I recently downloaded fasttext pretrained model for english. I got two files: wiki.en.vec wiki.en.bin I am not sure what is the difference between the two files?
Bhushan Pant
  • 1,445
  • 2
  • 13
  • 29
20
votes
3 answers

fastText embeddings sentence vectors?

I wanted to understand the way fastText vectors for sentences are created. According to this issue 309, the vectors for sentences are obtained by averaging the vectors for words. In order to confirm this, I wrote the following script: import numpy…
ryuzakinho
  • 1,891
  • 3
  • 21
  • 35
14
votes
6 answers

How to find similar words with FastText?

I am playing around with FastText, https://pypi.python.org/pypi/fasttext,which is quite similar to Word2Vec. Since it seems to be a pretty new library with not to many built in functions yet, I was wondering how to extract morphological similar…
Isbister
  • 906
  • 1
  • 12
  • 30
13
votes
1 answer

How does the Gensim Fasttext pre-trained model get vectors for out-of-vocabulary words?

I am using gensim to load pre-trained fasttext model. I downloaded the English wikipedia trained model from fasttext website. here is the code I wrote to load the pre-trained model: from gensim.models import FastText as…
Baktaawar
  • 7,086
  • 24
  • 81
  • 149
12
votes
2 answers

FastText using pre-trained word vector for text classification

I am working on a text classification problem, that is, given some text, I need to assign to it certain given labels. I have tried using fast-text library by Facebook, which has two utilities of interest to me: A) Word Vectors with pre-trained…
JarvisIA
  • 143
  • 1
  • 1
  • 4
11
votes
2 answers

How to save fasttext model in vec format?

I trained my unsupervised model using fasttext.train_unsupervised() function in python. I want to save it as vec file since I will use this file for pretrainedVectors parameter in fasttext.train_supervised() function. pretrainedVectors only accepts…
esin ildiz
  • 111
  • 1
  • 4
10
votes
3 answers

Continue training a FastText model

I have downloaded a .bin FastText model, and I use it with gensim as follows: model = FastText.load_fasttext_format("cc.fr.300.bin") I would like to continue the training of the model to adapt it to my domain. After checking FastText's Github and…
ted
  • 13,596
  • 9
  • 65
  • 107
10
votes
1 answer

Use Tensorflow and pre-trained FastText to get embeddings of unseen words

I am using a pre-trained fasttext model https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md). I use Gensim to load the fasttext model. It can output a vector for any words, no matter it is seen or unseen…
Munichong
  • 3,861
  • 14
  • 48
  • 69
9
votes
3 answers

FastText quantize documentation incorrect?

I'm unable to run FastText quantization as shown in the documentation. Specifically, as shown at the bottom of the cheat sheet page: https://fasttext.cc/docs/en/cheatsheet.html When I attempt to run quantization on my trained model…
9
votes
5 answers

FastText - Cannot load model.bin due to C++ extension failed to allocate the memory

I'm trying to use the FastText Python API https://pypi.python.org/pypi/fasttext Although, from what I've read, this API can't load the newer .bin model files at https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md as…
Filipe Aleixo
  • 3,924
  • 3
  • 41
  • 74
8
votes
1 answer

Can't suppress fasttext warning: 'load_model' does not return [...]

I'm struggling to suppress a specific warning related to fasttext. The warning is Warning : 'load_model' does not return WordVectorModel or SupervisedModel any more, but a 'FastText' object which is very similar. And here is the offending block of…
Ian
  • 3,605
  • 4
  • 31
  • 66
8
votes
1 answer

ModuleNotFoundError: No module named 'fasttext'

I have tried installing fasttext through conda using two channels: conda install -c conda-forge fasttext and conda install -c conda-forge/label/cf201901 fasttext as per (https://anaconda.org/conda-forge/fasttext). I am using the following command to…
Ashwin Geet D'Sa
  • 6,346
  • 2
  • 31
  • 59
8
votes
0 answers

Gensim FastText compute Training Loss

I am training a fastText model using gensim.models.fasttext. However, I can't seem to find a method to compute the loss of the iteration for logging purposes. If I look at gensim.models.word2vec, it has the get_latest_training_loss method which…
Hardian Lawi
  • 588
  • 5
  • 22
8
votes
2 answers

Fasttext algorithm use only word and subword? or sentences too?

I read the paper and googled as well if there is any good example of the learning method(or more likely learning procedure) For word2vec, suppose there is corpus sentence I go to school with lunch box that my mother wrapped every morning Then with…
Isaac Sim
  • 539
  • 1
  • 7
  • 23
8
votes
3 answers

How to vectorize whole text using fasttext?

To get vector of a word, I can use: model["word"] but if I want to get the vector of a sentence, I need to either sum vectors of all words or get average of all vectors. Does FastText provide a method to do this?
Andrey
  • 633
  • 2
  • 8
  • 13
1
2 3
30 31