3.0.0 • Published 4 years ago

sorted-edit-distance v3.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

sorted-edit-distance

npm.io npm.io

This tool can be used to improve edit-distance checks for strings by sorting the strings and then running the edit-distance algorithm.

eg.

Previous String A = dark apple eat
Previous String B = eat dark apple

# Now these strings will be sorted first :

New String A = apple dark eat
New String B = apple dark eat

Usage

const { sortedEditDistance, editDistance } = require('sorted-edit-distance');

const A = 'dark apple eat';
const B = 'eat dark apple';

const editDistance1 = sortedEditDistance(A, B);
const editDistance2 = editDistance(A, B);
3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago