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
5
votes
3 answers

Unable to install fastText for python on windows.

So I am unable to install fasttext for python on windows. I followed the methods mentioned in this issue When I enter python setup.py install, I get the following error: error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio…
humble
  • 2,016
  • 4
  • 27
  • 36
5
votes
1 answer

What is the difference between syntactic analogy and semantic analogy?

At 15:10 of this video about fastText it mentions syntactic analogy and semantic analogy. But I am not sure what the difference is between them. Could anybody help explain the difference with examples?
user1424739
  • 11,937
  • 17
  • 63
  • 152
4
votes
1 answer

Gensim fasttext cannot get latest training loss

Problem description It seems that the get_latest_training_loss function in fasttext returns only 0. Both gensim 4.1.0 and 4.0.0 do not work. from gensim.models.callbacks import CallbackAny2Vec from pprint import pprint as print from…
Jinhua Wang
  • 1,679
  • 1
  • 17
  • 44
4
votes
1 answer

FastText 0.9.2 - why is recall 'nan'?

I trained a supervised model in FastText using the Python interface and I'm getting weird results for precision and recall. First, I trained a model: model = fasttext.train_supervised("train.txt", wordNgrams=3, epoch=100,…
4
votes
1 answer

Reducing size of Facebook's fastText

I am building a machine learning model which will process documents and extract some key information from it. For this, I need to use word embedding for OCRed output. I have several different options for the embedding (Google's word2vec, Stanford's,…
ironhide012
  • 85
  • 1
  • 2
  • 7
4
votes
1 answer

Value of alpha in gensim word-embedding (Word2Vec and FastText) models?

I just want to know the effect of the value of alpha in gensim word2vec and fasttext word-embedding models? I know that alpha is the initial learning rate and its default value is 0.075 form Radim blog. What if I change this to a bit higher value…
M S
  • 894
  • 1
  • 13
  • 41
4
votes
1 answer

Converting Fasttext vector to word

I am having trouble converting a fast FastText vector back to a word. Here is my python code: from gensim.models import KeyedVectors en_model = KeyedVectors.load_word2vec_format('wiki.en/wiki.en.vec') vect = en_model.get_vector("turtles") How can…
DMM
  • 41
  • 3
4
votes
1 answer

Pyfasttest installation failure on Mac OS: fatal error: 'random' file not found

ERROR MESSAGES: src/pyfasttext.cpp:648:10: fatal error: 'random' file not found #include . ^~~~~~~~ . 1 warning and 1 error generated. error: command 'gcc' failed with exit status 1 Have installed gcc and…
Veronica Cheng
  • 447
  • 4
  • 13
4
votes
1 answer

Sentence vectors for fasttext

I tried for creating sentence vectors in fasttext for a single line in english in python, but all i got was solution related to CLI in fasttext. Link for fast test sentence vector creation I want a function or a library that can easily provide me…
4
votes
1 answer

Install fasttext on Windows 10 with anaconda

I am trying to install fasttext in anaconda with Windows 10 using the command: pip install fasttext as explained here: https://pypi.org/project/fasttext/ The error messages are: ValueError: Unknown MS Compiler version 1900 and Command…
Nicolas
  • 699
  • 1
  • 7
  • 9
4
votes
1 answer

loading of fasttext pre trained german word embedding's .vec file throwing out of memory error

I am using gensim to load the fasttext's pre-trained word embedding de_model = KeyedVectors.load_word2vec_format('wiki.de\wiki.de.vec') But this gives me a memory error. Is there any way I can load it?
shasvat desai
  • 419
  • 3
  • 11
4
votes
1 answer

ValueError: Variable Embedding already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined

Based on this github link https://github.com/brightmart/text_classification/tree/master/a03_TextRNN While I run train a03_TextRNN with google_news_wor22vec.bin and a text file with my documents + labels, I've got these errors : How can I solve this…
4
votes
1 answer

lsattr: Operation not permitted While reading flags on file in Ubuntu 16.04

I downloaded a fasttext word vector file from here. Although I can change the permissions and owner of the file, I am unable to read the flags or content. Following are the results of some commands: File permissions (ls -ltra wiki.es.vec) …
Arpita Sharma
  • 226
  • 3
  • 14
4
votes
1 answer

Calculate Confusion Matrix of a FastText Classifier model

I'm calculating for a Facebook FastText classifier model the confusion matrix in this way: #!/usr/local/bin/python3 import argparse import numpy as np from sklearn.metrics import confusion_matrix def parse_labels(path): with open(path, 'r')…
loretoparisi
  • 15,724
  • 11
  • 102
  • 146
4
votes
2 answers

precision and recall in fastText?

I implement the fastText for text classification, link https://github.com/facebookresearch/fastText/blob/master/tutorials/supervised-learning.md I was wondering what's the precision@1, or P@5 means? I did a binary classification, but I tested…
HAO CHEN
  • 1,209
  • 3
  • 18
  • 32
1 2
3
30 31