untitled notebook

node v10.15.3
version: 3.0.2
endpointsharetweet
var levenshtein = require('fast-levenshtein'); var wagnerFischer = require('wagner-fischer') let stringCompare = require('string-comparator'); let damerau = require("damerau-levenshtein"); var jaroNPM = require('jaro-winkler'); var stringSimilarity = require('string-similarity'); console.log(`levenshtein: ${levenshtein.get('9271025106 9271025106 9271025106 9271025106', 'Jesse Liamzon')}`); console.log(`wagnerFischer: ${wagnerFischer('9271025106 9271025106 9271025106 9271025106', 'Jesse Liamzon')}`); console.log(`cosine: ${stringCompare.cosine('9271025106 9271025106 9271025106 9271025106', 'Jesse Liamzon')}`); // Doesn't compare too well let damerauSimilarity = damerau('9271025106 9271025106 9271025106 9271025106', 'Jesse Liamzon'); //+1 damerauSimilarity = damerauSimilarity.similarity; console.log(`damerau: ${damerauSimilarity}`); console.log(`jaroNPM: ${jaroNPM('9271025106 9271025106 9271025106 9271025106', 'Jesse Liamzon')}`); console.log(`dice: ${stringSimilarity.compareTwoStrings('9271025106 9271025106 9271025106 9271025106', 'Jesse Liamzon')}`); //+1
Loading…

no comments

    sign in to comment