Documentation ¶
Overview ¶
Package match provides a fuzzy matcher for strings.
Example ¶
matcher := New([]string{"Golang", "Python", "C"}, 1, 2) for _, s := range []string{"go", "py", "c"} { fmt.Println(matcher.Closest(s)) }
Output: Golang Python C
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
Model is a collection of Words and Bags.
func New ¶
New returns an instance of Model. If bags isn't passed, you need to call model.Bag(bags) yourself.
func (*Model) Bag ¶
Bag adds a bag of grams of len n to the Model. Pass multiple ints for multiple bags.
Click to show internal directories.
Click to hide internal directories.