Skip to content

Commit 8bde4df

Browse files
authored
Merge pull request #1 from AAAton/master
Attempted to fix the code in the README.
2 parents 76a6602 + 2c06b56 commit 8bde4df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Then:
4747
Usage
4848
-----
4949

50-
var Annoy = require('annoy-node');
50+
var Annoy = require('annoy');
5151
var annoyIndex1 = new Annoy(10, 'Angular');
5252

5353
annoyIndex1.addItem(0, [-5.0, -4.5, -3.2, -2.8, -2.1, -1.5, -0.34, 0, 3.7, 6]);
@@ -70,10 +70,10 @@ Usage
7070
sum.push(v1[i] + v2[i]);
7171
}
7272

73-
var neighbors = obj2.getNNsByVector(sum, 10, -1, false);
73+
var neighbors = annoyIndex2.getNNsByVector(sum, 10, -1, false);
7474
console.log('Nearest neighbors to sum', neighbors);
7575

76-
var neighborsAndDistances = obj2.getNNsByVector(sum, 10, -1, true);
76+
var neighborsAndDistances = annoyIndex2.getNNsByVector(sum, 10, -1, true);
7777
console.log('Nearest neighbors to sum with distances', neighborsAndDistances);
7878
}
7979
}

0 commit comments

Comments
 (0)