0.0.10 • Published 2 years ago

text-similarity-scorer v0.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

text-similarity-scorer

npm

text-similarity-scorer is your goto similarity score between two strings

For more informatiom about the future of the package, check out the discussion here.

Table of contents

Install

npm i --save text-similarity-scorer

Usage

const similarity = require("text-similarity-scorer");

const score = similarity(
  "I HAVE A DREAM", //first sentence
  "I HAD A NAP" //second sentence
);
// NOTE : Order matters
console.log(score);
/*
{
  matched: [ 0, -1, 2, -1 ],
  matchScore: [ 1, 0, 1, 0 ],
  exact: 2,
  literal: 0,
  score: 2,
  score_pct: 0.5,
  order: 1,
  size: 0.25
}
*/

To Do

  • Adding ability to choose similarity algorithm

License

MIT

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago