Go Fuzzywuzzy Save

Port of SeatGeek's fuzzywuzzy

Project README

go-fuzzywuzzy

This is a port of SeatGeek's fuzzywuzzy, a fuzzy string matching library.

Usage

Levenshtein Edit Distance

fuzzy.EditDistance("bart", "bort")
1

Simple Ratio

fuzzy.Ratio("coolstring", "coooolstring")
91
fuzzy.Ratio("coolstring", "radstring"))
63

Partial Ratio

fuzzy.Ratio("needle", "haystackneedelhaystack")
36
fuzzy.PartialRatio("needle", "haystackneedelhaystack")
83

Token Sort Ratio

fuzzy.Ratio("several tokens arbitrary order", "order arbitrary several tokens")
50
fuzzy.TokenSortRatio("several tokens arbitrary order", "order arbitrary several tokens")
100

Token Set Ratio

fuzzy.TokenSortRatio("several tokens arbitrary order", "order order arbitrary several tokens")
91
fuzzy.TokenSetRatio("several tokens arbitrary order", "order order arbitrary several tokens")
100

Process

choices := []string{"Wayne Shorter", "Jonathan Richman", "Wayne Hancock", "Kate Bush"}
fuzzy.ExtractOne("wayne hancock", choices)
{Match:"Wayne Hancock", Score:100}
fuzzy.Extract("wayne hancock", choices, 2)
[{Match:"Wayne Hancock", Score:100}, {Match:"Wayne Shorter", Score:62}]
Open Source Agenda is not affiliated with "Go Fuzzywuzzy" Project. README Source: paul-mannino/go-fuzzywuzzy
Stars
111
Open Issues
4
Last Commit
2 years ago
License

Open Source Agenda Badge

Open Source Agenda Rating