Documentation ¶
Overview ¶
Package setsim provides fuctionality to calculate the distance between two ordered lists. The items within the list are interpreted as bytes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Distance ¶
Distance is a measure for the structural difference of two byte lists, which can be interpreted as strings. It first calculates the difference between two set items using Levenshtein distance. This distance measures serves as a weight to multiply with Spearman Foot Distance.
See also the documentation on SpearmanFootDistance concerning the normalization of strings.
For more information see http://theory.stanford.edu/~sergei/slides/www10-metrics.pdf
func SpearmanFootDistance ¶
SpearmanFootDistance calculates the Spearman Footrule Distance of two byte arrays For more information see https://mikespivey.wordpress.com/2014/01/20/the-maximum-value-of-spearmans-footrule-distance/ When comparing two strings, you might consider normalizing these strings eg. http://unicode.org/faq/normalization.html This function extends the classical definition of Spearman Footrule Distance in the sense that if one element of set a or set b is not contained within the other set, max(len a , len b ) is added to the Foot Distance.
func StringDistance ¶
StringDistance is a helper function to Distance which accepts an array of strings. See the documentation on SpearmanFootDistance concerning the normalization of strings.
Types ¶
This section is empty.