https://github.com/afjoseph/whitestrings
Go implementation of Simon White's String Similarity Algorithm
https://github.com/afjoseph/whitestrings
golang nlp simon-white string-metrics string-similarities-and-metrics string-similarity
Last synced: 6 months ago
JSON representation
Go implementation of Simon White's String Similarity Algorithm
- Host: GitHub
- URL: https://github.com/afjoseph/whitestrings
- Owner: afjoseph
- License: bsd-3-clause
- Created: 2020-12-26T17:20:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-26T17:35:31.000Z (over 5 years ago)
- Last Synced: 2024-06-20T12:39:33.442Z (about 2 years ago)
- Topics: golang, nlp, simon-white, string-metrics, string-similarities-and-metrics, string-similarity
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# White Strings -- Go implementation of Simon White's String Similarity Algorithm
This is a Go port of the "Strike A Match" algorithm from Simon White of
Catalysoft (http://www.catalysoft.com/articles/StrikeAMatch.html)
## Usage
go get github.com/afjoseph/whitestrings
## Example
package main
import (
"fmt"
"github.com/afjoseph/whitestrings"
)
func main() {
// Result: 1.0
fmt.Println(whitestrings.GetSimilarity("bunnyfoofoo", "bunnyfoofoo"))
// Result: 0.5714285714285714
fmt.Println(whitestrings.GetSimilarity("bunnyfoofoo", "bunny"))
// Result: 0.9
fmt.Println(whitestrings.GetSimilarity("bunnyfoofoo", "foofoobunny"))
// Result: 0.9
fmt.Println(whitestrings.GetSimilarity("bunnyfoofoo", "foobunnyfoo"))
}