tmikolov / word2vec

Automatically exported from code.google.com/p/word2vec
Apache License 2.0
1.52k stars 543 forks source link

Remove unnecessary if-statement #45

Open Simsso opened 5 years ago

Simsso commented 5 years ago

The if statement if (word == -1) continue; will never evaluate to true because when filling the sen array, words with id -1 are already being discarded by this check a few lines above.

I suggest to remove the if-statement because it is misleading and if it every evaluated to true, it would do so in the next iteration again (because sentence_position would not change) and the program would be in an infinite loop.