Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LevenshteinDistance ¶
LevenshteinDistance from https://groups.google.com/forum/#!topic/golang-nuts/YyH1f_qCZVc (no min, compute lengths once, pointers, 2 rows array) fastest profiled
Types ¶
type ClosestMatch ¶
type ClosestMatch struct {
WordsToTest []string
}
func New ¶
func New(wordsToTest []string) *ClosestMatch
func (*ClosestMatch) Accuracy ¶
func (cm *ClosestMatch) Accuracy() float64
func (*ClosestMatch) AccuracyMutatingLetters ¶
func (cm *ClosestMatch) AccuracyMutatingLetters() float64
AccuracyMutatingLetters runs some basic tests against the wordlist to see how accurate this bag-of-characters method is against the target dataset when mutating individual letters (adding, removing, changing)
func (*ClosestMatch) AccuracyMutatingWords ¶
func (cm *ClosestMatch) AccuracyMutatingWords() float64
AccuracyMutatingWords runs some basic tests against the wordlist to see how accurate this bag-of-characters method is against the target dataset
func (*ClosestMatch) AccuracySimple ¶
func (cm *ClosestMatch) AccuracySimple() float64
func (*ClosestMatch) Closest ¶
func (cm *ClosestMatch) Closest(searchWord string) string
Click to show internal directories.
Click to hide internal directories.