Documentation ¶
Overview ¶
Package compare implements comparators which can be used to score similarity between various build attributes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevenshteinComparator ¶
type LevenshteinComparator struct {
Opts levenshtein.Options
}
LevenshteinComparator implements the TextComparator interface, and scores similarity between two strings as their Levenshtein ratio.
func (LevenshteinComparator) Compare ¶
func (c LevenshteinComparator) Compare(s1, s2 string) float64
type TextComparator ¶
TextComparator is an interface which can score similarity between two strings.
Click to show internal directories.
Click to hide internal directories.