Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 954 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 954 Bytes

GoDoc

go-dice

An implementation of Dice coefficient algorithm in Go. Code is based on aceakash/string-similarity

Installation

$ go get github.com/robopuff/go-dice

Documentation

https://godoc.org/github.com/robopuff/go-dice

Usage examples

similarity := dice.ComparePair("healed", "sealed")
// `similarity` will be equal to 0.8
bestIndex, results := dice.FindBest("healed", []string{"mailed", "edward", "sealed", "theatre"})
// Since highest score will have "sealed" `bestIndex` will be equal to `2`
// and results will provide an array of ordered float32 similarity scores

License

This software is licensed under the BSD-3-Clause License. View the license.