Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
calculate the cosine distance between 2 arrays of strings
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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

Something went wrong with that request. Please try again.