Didyoumean in golang (Levenshtein distance)
MIT License
Didyoumean written in golang, find the similar string from the given string list. Currently it use Levenshtein distance to calculate edit distannce between two strings. See: https://en.wikipedia.org/wiki/Levenshtein_distance
$ go get https://github.com/sc0vu/didyoumean
or you can
import (
"https://github.com/sc0vu/didyoumean"
)
ThresholdRate is the rate that allows the edit distanse less than, eg 0.4 means the edit distance less than 40%
CaseInsensitive compare the edit distance in case insensitive mode
Find first match of the given string list
didyoumean.FirstMatch("key", []string{"kkk", "apple", "kea"})
Find all match of the given string list
didyoumean.Match("key", []string{"kkk", "apple", "kea"})
MIT