1.0.0 • Published 4 years ago

str-similarity v1.0.0

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

str-similarity

  • Reference:- Click here

Description

  • Levenshtein Algorithm
  • Cosine Similarity
  • Jaro-Winkler Algorithm

How to implement

  • For using Levenshtein Algorithm

Here is the code required to implement the code

const strSimilarity = require("str-similarity");

console.log(
  strSimilarity.levenshtein("Hi my name is John", "Hi my name is Mary")
);
  • For using Cosine Similarity Algorithm

Here is the code required to implement the code

const strSimilarity = require("str-similarity");

console.log(strSimilarity.cosine("Hi my name is John", "Hi my name is Mary"));
  • For using Jaro-Winkler Algorithm

Here is the code required to implement the code

const strSimilarity = require("str-similarity");

console.log(
  strSimilarity.jaroWrinker("Hi my name is John", "Hi my name is Mary")
);