Skip to content

Uppercases throw off the matcher #13

@pierrecamilleri

Description

@pierrecamilleri

Thanks for the useful tool.
It seems that the matcher does not deal well with uppercases. For instance:


import (
	"fmt"

	"github.com/schollz/closestmatch"
)

func main() {
	fmt.Println("Hello, playground")
	words := []string{
		"foo",
		"bar",
		"faz",
	}
	bagSize := []int{2}

	cm := closestmatch.New(words, bagSize)
	fmt.Println(cm.Closest("fooo"))
	fmt.Println(cm.Closest("FOO"))
}

https://play.golang.org/p/M9IMnrqRUsG
does not find anything for FOO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions