and fixed the minimal cosine similarity to be -1 instead of 0

This commit is contained in:
tmikolov 2013-12-19 00:16:00 +00:00
parent ab5da71611
commit 5815e5d0dd

@ -110,7 +110,7 @@ int main(int argc, char **argv) {
for (a = 0; a < size; a++) len += vec[a] * vec[a];
len = sqrt(len);
for (a = 0; a < size; a++) vec[a] /= len;
for (a = 0; a < N; a++) bestd[a] = 0;
for (a = 0; a < N; a++) bestd[a] = -1;
for (a = 0; a < N; a++) bestw[a][0] = 0;
for (c = 0; c < words; c++) {
a = 0;