Skip to content

C# version of calculating the Damerau Levenshtein Distance. Code is based on the Wikipedia article.

Notifications You must be signed in to change notification settings

ArveH/StringStuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StringStuff

Calculating the Damerau Levenshtein Distance.

Code is based on the Wikipedia article: https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance There are three versions of the algorithm:

  • Optimal string alignment distance (restricted edit distance)
  • Levenshtein Distance (same as above, but without transposition)
  • True Damerau–Levenshtein distance with adjacent transpositions

I also added a version found on StackOverflow for comparison: http://stackoverflow.com/questions/9453731/how-to-calculate-distance-similarity-measure-of-given-2-strings/9454016#945401

It's a Console program where you enter two strings, and it will print the distance using all 4 versions of the algorithm. It will also print the internal matrix used when calculating the distance.

OBS: There are much better versions of the algorithms out there, I just coded this to learn how it works!

About

C# version of calculating the Damerau Levenshtein Distance. Code is based on the Wikipedia article.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages