Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while loading French binary model #2529

Closed
qdHe opened this issue Jun 15, 2019 · 3 comments
Closed

Error while loading French binary model #2529

qdHe opened this issue Jun 15, 2019 · 3 comments
Labels
need info Not enough information for reproduce an issue, need more info from author

Comments

@qdHe
Copy link

qdHe commented Jun 15, 2019

I download pretrained fasttext models of English and French from https://fasttext.cc/docs/en/pretrained-vectors.html. When I use load_facebook_model() function to load the data, wiki.en.bin goes well but wiki.fr.bin cannot be loaded. The error is

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/home/qihe/r-1694068/build/scsar-word-embeddings/venv/lib/python3.6/site-packages/gensim/models/fasttext.py", line 1299, in l
oad_facebook_vectors
   model_wrapper = _load_fasttext_format(path, encoding=encoding, full_model=False)
 File "/home/qihe/r-1694068/build/scsar-word-embeddings/venv/lib/python3.6/site-packages/gensim/models/fasttext.py", line 1323, in _
load_fasttext_format
   m = gensim.models._fasttext_bin.load(fin, encoding=encoding, full_model=full_model)
 File "/home/qihe/r-1694068/build/scsar-word-embeddings/venv/lib/python3.6/site-packages/gensim/models/_fasttext_bin.py", line 271,
in load
   raw_vocab, vocab_size, nwords = _load_vocab(fin, new_format, encoding=encoding)
 File "/home/qihe/r-1694068/build/scsar-word-embeddings/venv/lib/python3.6/site-packages/gensim/models/_fasttext_bin.py", line 167,
in _load_vocab
   raise NotImplementedError("Supervised fastText models are not supported")
NotImplementedError: Supervised fastText models are not supported

I do not think only the French model is supervised. Is there any bug? If it is not a bug in gensim, I guess there is some problem in the model. With a closer look, I find that the value of nwords and the size of vocabulary is 1152450, while the size of vectors is 1152449. I am not sure what is the reason of this mismatch. @cpuhrsch

System: RHEL 7
Gensim: 3.7.2

Some related issue: facebookresearch/fastText#218

@mpenkov mpenkov added the need info Not enough information for reproduce an issue, need more info from author label Jul 7, 2019
@mpenkov
Copy link
Collaborator

mpenkov commented Jul 7, 2019

Please provide sample source code to reproduce your issue.

@cpuhrsch
Copy link

cpuhrsch commented Jul 8, 2019

@qdHe - I am not working on fastText anymore, please refer to the current maintainers possibly based on recent commits over at the main repository.

@mpenkov
Copy link
Collaborator

mpenkov commented Sep 28, 2019

Closing due to lack of information from author.

@mpenkov mpenkov closed this as completed Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need info Not enough information for reproduce an issue, need more info from author
Projects
None yet
Development

No branches or pull requests

3 participants