Commit 5815e5d0 authored by tmikolov's avatar tmikolov

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

parent ab5da716
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment