Planeshifter / node-word2vec

Node.js interface to the Google word2vec tool.
Apache License 2.0
348 stars 55 forks source link

Code 126 #7

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi there - I am running a very basic example, but something seems not to work. I get a code 126 all the time, but not sure what is happening. Here is my code


w2v = require('word2vec');

w2v.word2phrase( 'in.txt', 'out.txt', {
    threshold:100,
    debug:2,
    minCount: 5
}, done);

function done(data)
{
  console.log(data);
}
x10ba commented 8 years ago

Hi, I get the same issues-- does it have to do with the output file?

Planeshifter commented 8 years ago

Sorry that you are experiencing issues. Can you try calling the function with absolute paths for the input and output files? Also, would you be so kind and print the entire error message and let me know what OS you are on? Thanks!

x10ba commented 8 years ago

Error: Child process exited with code 126 my system: OSX El Capitan 10.11.3 Node v4.1.1

// running @mdaymond code above

prints this: [ '-cbow', 1, '-size', 200, '-window', 8, '-negative', 25, '-hs', 0, '-sample', 0.0001, '-threads', 20, '-iter', 15, '-min-count', 5 ]

and

gets this error: Child process exited with code 126

Planeshifter commented 8 years ago

I think there were some issues in how file paths were handled in the module. I pushed a new version which now works for me on MacOS. Could you please try it out, too?

x10ba commented 8 years ago

Hi, I did npm update word2vec, then I ran the Original Poster's code (see above) and got the following output:

Starting training using file ../../../file Words processed: 28800K Vocab size: 1K
Vocab size (unigrams + bigrams): 1346 Words in train file: 28853389 Words written: 28800K Child process exited with code 0 undefined // i believe this is just that data is undefined in the original code.

I'd consider this issue closed for MAC/ OSX Thanks for following up. x10ba

Planeshifter commented 8 years ago

Okay, thanks for letting me know! Closing this issue now.

GenrikhFetischev commented 5 years ago

Okay, thanks for letting me know! Closing this issue now.

Hi! I have the same issue with the latest 1.1.4 version of the package. I tried to change version to 1.1.2 and it works. Seems like something was broken again in the latest version. Could you please take a look at this or maybe give me advice about what I do wrong?

cheerjam commented 5 years ago

yes ,It broke again in 1.1.4 version,I have been working all the day for this 126 problem TAT

HomyeeKing commented 3 years ago

same issue here