Questions tagged [fasttext]
fastText is a library for efficient learning of word representations and sentence classification.
410
questions
0
votes
0
answers
11
views
Is there a way to make the Fasttext Wikipedia Model for English Less Spelling Dependent?
I'm trying to do a comparison between the English and Mandarin Wikipedia vectors trained using Fasttext, but I'm encountering the issue that the English Vectors seems to give me a lot of orthographic ...
1
vote
1
answer
17
views
How to make fasttext's get_sentence_vector vector larger?
I have trained in unsupervised way fasttext model and now I am using get_sentence_vector() function to get vectors of sentences. But it outputs vectors with length 100. How could I make those vectors ...
0
votes
1
answer
22
views
fasttext train_supervised model: get top predicted labels
I have used fasttext train_supervised utility to train a classification model according to their webpage https://fasttext.cc/docs/en/supervised-tutorial.html .
model = fasttext.train_supervised(input=...
0
votes
1
answer
30
views
How to work with a range of n-grams on Facebook FastText?
I am trying to train a text classifier with FastText. It has a bunch of options along with a facility to train from the command line. One of the options is wordNgrams.
In my particular dataset, I ...
0
votes
1
answer
14
views
fasttext: why do aligned vectors contain only one value per word?
I was taking a look at the Fasttext aligned vectors of some languages and was surprised to find that each vectors consisted of one value only. I was expecting a Matrix witch multidimensional vectors ...
0
votes
1
answer
47
views
Imbalanced multiclass classification using company names
I have this classification scenario below in which Im getting a very low F1, precision, recall and other metrics.
Target is multiclass (about ~200 classes) which is highly imbalanced
I only use ...
0
votes
1
answer
24
views
How to handle irrevelant texts with FastText predictions?
I am creating a model which aims to classify my text in one of the defined classes, for example computer science, sport and politics.
For example, the training file could look like this :
...
-1
votes
1
answer
30
views
Should I leave periods in text when training fasttext model?
I have a dataset:
text
Market regularisation. Researching the marketplace and recommending the most appropriate products
Advising clients on investments, taxes, estate planning. Meeting with ...
0
votes
1
answer
59
views
Fitting a Gensim Fasttext pretrained model to my text
I have a pretrained fast text model, I have loaded it into my notebook and want to fit it to my free form text to train a ML classifier.
import pandas as pd
from sklearn.model_selection import ...
0
votes
0
answers
43
views
Export fasttext vectors (korean) from fastText to spacy (UnicodeDecodeError)
Hi everyone i downloaded the korean fasttext model from FastText Korean Model and tried to export it to spacy using this code:
#!/usr/bin/env python
# coding: utf8
from __future__ import ...
0
votes
2
answers
78
views
Unable to Load FastText model
I am trying to load the FastText and save that as a model so that I can deploy that on production as the file size is 1.2 gb and wont be a good practice to use that on Prod.
Can anyone suggest an ...
1
vote
0
answers
118
views
How can I deploy a fasttext model on google cloud?
I just want to have a model I can reach via REST API, and the model just has to be this :
import fasttext
ft = fasttext.load_model('pretrained model location')
But I want it to be on the Google ...
-1
votes
1
answer
63
views
Google Drive pretrained model file can't be opened for loading?
I have deployed a demo of a product using Heroku and I would like to load a pretrained fasttext model via a file in my Google Drive. I successfully downloaded the library via my heroku requirements ...
-1
votes
2
answers
88
views
Multi-label classification with FastText
I was wondering if FastText is able to deal with multi-labelled data? Could someone share a simple example along with a confusion matrix (true vs predicted labels)? I have already taken a look at ...
2
votes
1
answer
50
views
Can I use a different corpus for fasttext build_vocab than train in Gensim Fasttext?
I am curious to know if there are any implications of using a different source while calling the build_vocab and train of Gensim FastText model. Will this impact the contextual representation of the ...
0
votes
0
answers
15
views
importing fasttext from zip file in IntelliJ idea
I am running maven test cases with fasttext.
I am getting error: No module named fasttext_pybind
main
sc.addPyfile(os.path.join(run_path, './fasttext_predict.py'))
sc.addPyfile(os.path.join(run_path, '...
0
votes
1
answer
43
views
Why does fasttext yield <\s> as first entry in VSM?
I am using a large German corpus, which I have cleaned of all special characters/numbers/inter-punctuation signs.
Each line contains one sentence.
Running
fastText/./fasttext skipgram -input input.txt ...
-2
votes
1
answer
149
views
Error : cc.fr.300.bin cannot be opened for loading
I am using Azure Machine Learning and Azure Databricks.
In Azure Databricks I have a script.py written by %% command (%%write script.py).
In this script I tried to load cc.fr.300.bin that is saved as ...
0
votes
1
answer
117
views
How use a .bin file in blob storage to be loaded to a model?
I have a .bin file in a blob in Azure Blob Storage.
I would like to use it to give to fasttext to use a method.
I tried it:
fr_embedding_file_path = "cc_fr_300_bin/cc.fr.300.bin"
...
1
vote
0
answers
337
views
Can't install fasttext on docker container
I am trying to build a python docker container.
Here is my dockerfile:
# syntax=docker/dockerfile:1
FROM python:3.8-slim
WORKDIR /src
COPY req.ini req.ini
RUN apt-get update
RUN pip install --upgrade ...
0
votes
2
answers
112
views
Loading fasttext binary model from s3 fails
I am hosting a pretrained fasttext model on s3 (uncompressed) and I am trying to load it in a lambda function. I am using the gensim.models.fasttext module to load the model:
from gensim.models....
0
votes
0
answers
235
views
Error installing fasttext on Ubuntu 21.04
i'm trying to install the latest git fasttext code (Jan 25, 2022), and getting error
Using the latest Version : https://github.com/facebookresearch/fastText.git
Ubuntu 21.04
gcc (Ubuntu 10.3.0-...
0
votes
0
answers
110
views
Accessing fasttext vectors in spaCy
I have converted the fasttext vectors into spacy format using init command. It has been done successfully as shown below;
ℹ Creating blank nlp object for language 'en'
✔ Successfully converted 400873 ...
0
votes
1
answer
153
views
By what criteria do we find out that fasttext unsupervised is well trained?
I want to train unsupervised fasttext for word representation. To do this, I have install fasttext from official website, I read the word representation page, and I used model = fasttext....
1
vote
0
answers
44
views
Multioutput Classification model with FastText supervised classifier
Is there any way I can create a multioutput model with the fasttext python client and the sklearn MultiOutputClassifier object? I have multiple training datasets for each of the target columns. The ...
0
votes
1
answer
35
views
Fasttext model representations for numbers
I would like to create a fasttext model for numbers. Is this a good approach?
Use Case:
I have a given number set of about 100.000 integer invoice-numbers.
Our OCR sometimes creates false invoice-...
0
votes
1
answer
148
views
How to load pre trained FastText Word Embeddings using Gensim?
I downloaded word embedding from this link. I want to load it in Gensim to do some work but I am not able to load it. I have found many resources and none of it is working. I am using Gensim version 4....
0
votes
1
answer
58
views
Nearest Neighbours of OOV are also OOV - FastText
I am trying to get the nearest neighbors of an out-of-vocabulary (OOV) word in fasttext, however, it appears that also the nearest neighbors are OOV as well? This is the code I'm using:
# get the ...
0
votes
1
answer
79
views
Upload a pre-trained spanish language word vectors and then retrain it with custom sentences? (GENSIM -FASTTEXT)
I am trying to upload a pre-trained spanish language word vectors and then retrain it with custom sentences:
!pip install fasttext
import fasttext
import fasttext.util
#download pre-trained spanish ...
0
votes
1
answer
124
views
FastText: TypeError: loadModel(): incompatible function arguments
Edit: Working on Windows
I just want do load an already downloaded fasttext embedding model but got an error (see at the bottom) I can't find a solution to. This is the code:
import fasttext
from ...
0
votes
1
answer
57
views
How to load trained fasttext embedding in TorchText?
I generated fine-tuned/ trained fasttext embedding based on unsupervised method using the reference here - https://fasttext.cc/docs/en/unsupervised-tutorial.html. Now I am trying to load this ...
0
votes
2
answers
464
views
Keras model with fasttext word embedding
I am trying to learn a language model to predict the last word of a sentence given all the previous words using keras. I would like to embed my inputs using a learned fasttext embedding model.
I ...
2
votes
1
answer
85
views
How to run non-spark model training task (using fasttext) efficiently on a databricks cluster?
I want to train some models using fasttext and since it doesn't use spark, it will be running on my driver. The number of training jobs that will be running simultaneously is very large and so is the ...
1
vote
0
answers
65
views
How to convert classification model from fastText to a TensorFlow SavedModel to be used in BigQuery ML?
I have a trained model saved from fastText. The model is saved with model.save_model("model.bin")
I need to load the model to BigQuery ML and run it there. BigQuery ML allows to import a ...
0
votes
2
answers
120
views
fastText producing zero vector
I am facing the following error which calculating the cosine similarity on embeddings produced by fastText:
/home/kgarg8/anaconda3/envs/CiteKP/lib/python3.6/site-packages/scipy/spatial/distance.py:721:...
0
votes
1
answer
150
views
Text preprocessing for fasttext pretrained models
I want to use pretreained fastext model for language detection: https://fasttext.cc/docs/en/language-identification.html . Where can I find the exact Python code for text preprocessing used for ...
1
vote
1
answer
116
views
Is there any ideal parameter values for fasttext train_supervised function?
I working on NLP problem and try to make text classification with word embedding method. I am training my model with fasttext's train_supervised but is there any ideal or best parameter values for ...
0
votes
1
answer
34
views
Hosting fasttext model (.bin) in redis
I have trained a text classification model (for classifying User Agent strings) and generated a bin file. I'm looking to host the model (preferably Redis) but haven't found any articles in relevance. ...
0
votes
0
answers
63
views
Best NER algorithm to extract serial number and unknown word
I need to recognize all the serial numbers present within a long text (OCR result) of variable length and format, but having a small sample data set available.
I'll give you an example.
This is the ...
0
votes
1
answer
100
views
Cleaning Webscrape Text for FastText in Python
BLUF: How can I clean up large corpora with issues of words being lumped together (like "quarterbackpa" or "passquarterback")?
Background:
I am working on my Capstone project for ...
0
votes
1
answer
15
views
`FastText.wv.save_word2vec_format()` creates some entries with two words on one line
FastText.wv.save_word2vec_format() creates some entries with two words on one line. This is a problem because it breaks the KeyedVectors.load_word2vec_format() function, which expects one word ...
0
votes
1
answer
91
views
Preparing large txt file for gensim FastText unsupervised model
When I attempt to run FastText using gensim in Python, the best I can get is a result that gives me the most similar but each result is a single character. (I'm on a windows machine, which I've heard ...
0
votes
1
answer
134
views
FastText: AttributeError: type object 'FastText' has no attribute 'reduce_model'
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 ...
0
votes
0
answers
57
views
Pretraining/transfer learning with SageMaker BlazingText (word2vec)?
I have a training set consisting of a description and a binary label. From reading previous work, I know that using pretrained fasttext embeddings should work well for my use case. I need to be able ...
0
votes
1
answer
91
views
Load trained model only once
I have a FastText trained model "*.ftz". My program runs in the multithread mode.
Is there anyway to load a model once and use it without loading for each thread?
2
votes
1
answer
317
views
Training fasttext word embedding on your own corpus
I want to train fasttext on my own corpus. However, I have a small question before continuing. Do I need each sentences as a different item in corpus or can I have many sentences as one item?
For ...
1
vote
1
answer
53
views
Do documents without labels add information to Facebook's FastText supervised classifier?
I hope you guys are doing great.
I'm training a classifier with Facebook's FastText to determine if a piece of text (tweet) is talking about economy or not.
For doing this task, I have about 2200 ...
0
votes
2
answers
260
views
Loading a FastText Model from s3 without Saving Locally
I am looking to use a FastText model in a ML pipeline that I made and saved as a .bin file on s3. My hope is to keep this all in a cloud based pipeline, so I don't want local files. I feel like I am ...
1
vote
0
answers
577
views
ERROR:root:can't pickle fasttext_pybind.fasttext objects
I am using gunicorn with multiple workers for my machine learning project. But the problem is when I send a train request only the worker getting the training request gets updated with the latest ...
0
votes
1
answer
255
views
Q: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 0: unexpected end of data
I am using FastText.load_fasttext_format()to load fastText Offial Japanese trained model(300 dim) in Google Colab.
Here is my code.
model_path = "/content/drive/MyDrive/IDR/rakuten/...