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
2
votes
1 answer

How to run Fasttext get_nearest_neighbors() faster?

I'm trying to extract morphs/similar words in Sinhala language using Fasttext. But FastText takes a 1 second for 2.64 words. How can I increase the speed without changing the model size? My code looks like this: import…
Rumesh Madhusanka
  • 1,105
  • 3
  • 12
  • 26
2
votes
2 answers

Loading pre trained fasttext model

I have a question about fasttext (https://fasttext.cc/). I want to download a pre-trained model and use it to retrieve the word vectors from text. After downloading the pre-trained model (https://fasttext.cc/docs/en/english-vectors.html) I unzipped…
Hansmagnetron
  • 35
  • 1
  • 1
  • 4
2
votes
0 answers

FastText: upper case or lower case

Using the pre-trained model: import fasttext.util fasttext.util.download_model('en', if_exists='ignore') # English ft = fasttext.load_model('cc.en.300.bin') both queries ft['HOME'] and ft['home'] works, but return different vectors. What is the…
sarabert96
  • 63
  • 3
2
votes
2 answers

Trouble to execute sample code using fastText

Background I would like to execute the code to categorize language of each text using fastText. What I have done downloaded the model lid.176.bin https://fasttext.cc/docs/en/language-identification.html installed the python binding $ git clone…
halt
  • 393
  • 5
  • 17
2
votes
2 answers

Fasttext inconsistent on one label model classification

I'm using official FastText python library (v0.9.2) for intents classification. import fasttext model = fasttext.train_supervised(input='./test.txt', loss='softmax', dim=200, bucket=2000000, epoch=25, lr=1.0) Where test.txt contains just…
Tzomas
  • 704
  • 5
  • 17
2
votes
1 answer

Fasttext Fatal Python error: Floating point exception in Docker gitlab runner test

I'm doing a little test of a Fasttext wrapper in a docker runner. This is the test: import fasttext import tempfile def test_fasttext_fit_save(): x_clean = [ "comment important one", "this is other comment", …
2
votes
2 answers

How to use pre-trained word vectors in FastText?

I've just started to use FastText. I'm doing a cross validation of a small dataset by using as input the .csv file of my dataset. To process the dataset I'm using this parameters: model = fasttext.train_supervised(input=train_file, …
Pelide
  • 468
  • 1
  • 4
  • 19
2
votes
1 answer

fastText test_label shows recall as nan for all labels in text classification

After training a supervised model with fastText, I try to get the metrics for each label with: model.test_label('testdata.txt') However, I get nan for every label's recall. An example of the output is '__label__Facility': {'precision':…
effy
  • 21
  • 2
2
votes
0 answers

Fasttext model load time

I have trained a model using AWS SageMaker and downloaded the model from SageMaker. The model .bin file is 1.7GB in size. Now, I am loading the model using fasttext(https://fasttext.cc/docs/en/unsupervised-tutorial.html) using below code model =…
slysid
  • 5,236
  • 7
  • 36
  • 59
2
votes
2 answers

Fasttext Quantize Unsupervised model

I am trying to quantize the unsupervised model in fasttext using this command. model.quantize(input=train_data, qnorm=True, retrain=True, cutoff=200000) It's throwing an error that it is supported for only supervised models. Is there any alternate…
Bhaskar
  • 333
  • 2
  • 12
2
votes
1 answer

How to get most significant tokens for each label in Fasttext supervised classification model?

I've trained a Fasttext model using .train_supervised() and can't get my head around how to get the most important words for each label according to the model. I have three labels so I would expect to be able to do something…
mattiasostmar
  • 2,869
  • 4
  • 17
  • 26
2
votes
1 answer

Spell checking using fastText model?

So I'm using fastText from its GitHub repo and wondering if it has build-in spell checking command. If yes, how do I use them? and can I get full documentation of fastText because as in here answer from Kalana Geesara, I could use…
uyu
  • 23
  • 3
2
votes
1 answer

fasttext building error as Python module in Docker container

I have been trying to install fasttext in a docker container. I am getting the same error after trying many pre-installations. Essentially, I have the same code in windows and I installed via pip in PyCharm. It works without any problem. I thought…
Sojimanatsu
  • 619
  • 11
  • 28
2
votes
1 answer

TypeError: (): incompatible function arguments. The following argument types are supported: 1. (self: fasttext_pybind.args, arg0: float) -> None

I would like Model training with train.py file, but I keep getting the following error: setattr(a, k, v) TypeError: (): incompatible function arguments. The following argument types are supported: 1. (self: fasttext_pybind.args, arg0: float) ->…
Van
  • 31
  • 1
  • 1
  • 3
2
votes
1 answer

Issues while loading a trained fasttext model using gensim

I am trying to load a trained fasttext model using gensim. The model has been trained on some data. Earlier, I have used model.save() with a extension of .bin to use it later. After the training process and saving the model using model.save in .bin…
M S
  • 894
  • 1
  • 13
  • 41