@haggholm/damerau-levenshtein
v1.0.14
Published
An N-API/C++ port of the Damerau-Levenshtein implementation from natural
Downloads
115
Maintainers
Readme
Damerau-Levenshtein distance
A direct port of the Levenshtein/Damerau-Levenshtein algorithm from natural to an N-API/C++ extension.
In the browser, it will use the implementation copied from
natural, with the
addition of an offset
parameter in search results.
In NodeJS, it uses the N-API implementation. In tests on production data on our workload, it is ~15x faster than the original JS; on smaller strings as used in the automated tests, the speedup is ~27x.
Correctness is based on the assumption that natural
is correct. :-)
Compliance is currently verified by running distance checks on several
thousand random sample strings and verifying that the N-API generates
identical results.