calculate the cosine distance between 2 arrays of strings
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.coveralls.yml
.gitignore
.jshintrc
.tern-project
.travis.yml
Makefile
component.json
license
package.json
readme.md

readme.md

cosine

NPM version Build Status Dependency Status Coverage Status Code Climate

install

npm install [--save/--save-dev] cosine
component install ramitos/cosine

api

var cosine = require('cosine')

var s1 = 'Julie loves me more than Linda loves me'.split(/\s/)
var s2 = 'Jane likes me more than Julie loves me or'.split(/\s/)

cosine(s1, s2) // => 0.7833494518006403

license

MIT