vunb / node-fasttext

Nodejs binding for fasttext representation and classification.
MIT License
43 stars 14 forks source link

SIGSEGV error on big models #24

Open aralroca opened 3 years ago

aralroca commented 3 years ago

I see that there is an error when loading big models. I used the cc.en.300.bin example of the fastText webpage:

https://fasttext.cc/docs/en/crawl-vectors.html

Used code:

const path = require('path');
const fastText = require('fasttext');

const model = path.resolve(__dirname, './cc.en.300.bin');
const query = new fastText.Query(model);

query.nn('salmon', 5)
  .then(r => console.log(r))
  .catch(e => console.log('Error', e))

Error on execute:

error Command failed with signal "SIGSEGV".
aralroca commented 3 years ago

Node version v14.15.5