Skip to content

Commit 8090d05

Browse files
and fixed the minimal cosine similarity to be -1 instead of 0
git-svn-id: http://word2vec.googlecode.com/svn/trunk@37 c84ef02e-58a5-4c83-e53e-41fc32d635eb
1 parent da1cb99 commit 8090d05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

distance.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int main(int argc, char **argv) {
110110
for (a = 0; a < size; a++) len += vec[a] * vec[a];
111111
len = sqrt(len);
112112
for (a = 0; a < size; a++) vec[a] /= len;
113-
for (a = 0; a < N; a++) bestd[a] = 0;
113+
for (a = 0; a < N; a++) bestd[a] = -1;
114114
for (a = 0; a < N; a++) bestw[a][0] = 0;
115115
for (c = 0; c < words; c++) {
116116
a = 0;

0 commit comments

Comments
 (0)