Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 1.18 KB

README.md

File metadata and controls

17 lines (14 loc) · 1.18 KB

levenshtein

Go Report Card GoDoc license

This package provides functions for calculating the Levenshtein distance (a type of edit distance) between two strings, and for generating a minimal list of edit operations required to convert the source string into the target string. It does this by building an edit matrix according to the Wagner-Fischer Algorithm. Alternative insertion/removal/swap costs can be provided as options. The list of edit operations is retrieved via a recursive algorithm which reads off a backtrace of edit operations from the matrix.

Documentation and examples can be found at godoc.org