sorted-edit-distance

3.0.0 • Public • Published

sorted-edit-distance

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);

Readme

Keywords

Package Sidebar

Install

npm i sorted-edit-distance

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

3.49 kB

Total Files

4

Last publish

Collaborators

  • kartikkhk