2
$\begingroup$

I'm trying to run language detection using Facebook's fastText through a Python script but I get this error when I load the model :

Exception: fastText: Cannot load lid.176.bin due to C++ extension failed to allocate the memory

Any ideas? I've already installed all prerequisites and still get this error.

$\endgroup$

1 Answer 1

2
$\begingroup$

You are probably trying to load word vectors that are shared in the fasttext.cc website or are trying to load using models that are trained with the latest one on master. There is an issue in github with a lot of comments. One solution is to try to load from the text files the code for which is given here. I was able to work around this using java but had to train it in java only. Take a look at the examples in this package.

https://github.com/vinhkhuc/JFastText/tree/master/examples/api

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.