levenshtein

package
v2.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LevenshteinDistance

func LevenshteinDistance(a, b *string) int

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL