Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LevenshteinDistance ¶
LevenshteinDistance calculate the levenshtein distance between two strings. I use an algorithm from Sten Hjelmqvist. http://www.codeproject.com/Articles/13525/Fast-memory-efficient-Levenshtein-algorithm You can also see the algorithm on wikipedia : https://en.wikipedia.org/wiki/Levenshtein_distance It's the last code.
func PartialRatio ¶
PartialRatio allow you to calculate the "best partial" ratio. It takes the smaller string and we compare the smaller with a partial string from the bigger one. Could be useful if you have to compare two strings with very different length
func Ratio ¶
Ratio allow you to calculate the percentage of variance between two strings if the two strings are equals the function returns 1.
func TokenSetRatio ¶
TokenSetRatio splits the strings in two groups : intersection and remainder and then we compare the group with each other.
func TokenSortRatio ¶
TokenSortRatio allow you to compare two strings "ordered" alphabetically so if you have two strings not ordered. This function could be useful.
Types ¶
This section is empty.