go-similarity

Similarity or distance metrics for string implemented on Golang, inspired by Sam Chapman's SimMetrics library.
Installation
Run the following command to install the package:
go get -u github.com/ghosind/go-similarity
Getting Started
To use the similarity package, you need to import it in your Go file and create a new instance of the similarity you want to use.
sim := new(similarity.BlockDistance)
similarity := sim.Compare("Hello World", "Hello Go")
fmt.Println(similarity)
// 0.5
Supported Metrics Algorithms
Builtin Tokenizers
- Whitespace Tokenizer: Tokenize the input string by whitespace.
License
This project is licensed under the MIT License - see the LICENSE file for details.