Skip to content

An implementation of Dice algorithm to compare strings

License

Notifications You must be signed in to change notification settings

robopuff/go-dice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An implementation of Dice algorithm to compare strings

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages