File Exchange

image thumbnail

Levenshtein Distance Fast (MEX) C++

version 1.0.0.0 (4.5 KB) by Hanan Shteingart
Computing the Levenstein distance between strings fast in matlab using external mex c++ code

3 Downloads

Updated 29 Apr 2014

View License

A C++ mex code for fast calculation of the Levenshtein distance between two strings.
You need to compile this using "mex -setup" and then "men LevenDistance.cpp".
This is based on a corrupted source code from:
http://hi.baidu.com/mhyuycwnspbqswe/item/936632f359a5a9b631c199d8

Cite As

Hanan Shteingart (2021). Levenshtein Distance Fast (MEX) C++ (https://www.mathworks.com/matlabcentral/fileexchange/46400-levenshtein-distance-fast-mex-c), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Thirupathi Nagaraju

Oleg Komarov

Tested against other m-code implementations. It's more that two orders of magnitude faster.

However, it would be great if an .m file with the help was added.

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!