A fuzzy string matching algorithm in Go, as described at http://www.catalysoft.com/articles/strikeamatch.html
$ go get github.com/ivanfoong/strikeamatch-go
$ cd $GOPATH/src/github.com/ivanfoong/strikeamatch-go/strikeamatch
$ go test
package main
import (
"fmt"
"github.com/ivanfoong/strikeamatch-go/strikeamatch"
)
func main() {
text1 := "Web Database Applications with PHP & MySQL"
text2 := "Web Database Applications"
fmt.Printf("`%s` compared to `%s` has a score of %.2f\n", text1, text2, strikeamatch.CompareString(text1, text2))
// prints `Web Database Applications with PHP & MySQL` compared to `Web Database Applications` has a score of 0.82
}
MIT License
- 1.0.0 - Added CompareString method