Skip to content

Commit

Permalink
Merge pull request #1 from AAAton/master
Browse files Browse the repository at this point in the history
Attempted to fix the code in the README.
  • Loading branch information
jimkang authored Dec 21, 2016
2 parents 76a6602 + 2c06b56 commit 8bde4df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Then:
Usage
-----

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

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

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

var neighborsAndDistances = obj2.getNNsByVector(sum, 10, -1, true);
var neighborsAndDistances = annoyIndex2.getNNsByVector(sum, 10, -1, true);
console.log('Nearest neighbors to sum with distances', neighborsAndDistances);
}
}
Expand Down

0 comments on commit 8bde4df

Please sign in to comment.