mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-22 14:20:28 +00:00
go: update modules
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
00deb3ada6
commit
9e437eee80
166 changed files with 9373 additions and 3493 deletions
49
vendor/github.com/xrash/smetrics/README.md
generated
vendored
Normal file
49
vendor/github.com/xrash/smetrics/README.md
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
[](http://travis-ci.org/xrash/smetrics)
|
||||
|
||||
# smetrics
|
||||
|
||||
`smetrics` is "string metrics".
|
||||
|
||||
Package smetrics provides a bunch of algorithms for calculating the distance between strings.
|
||||
|
||||
There are implementations for calculating the popular Levenshtein distance (aka Edit Distance or Wagner-Fischer), as well as the Jaro distance, the Jaro-Winkler distance, and more.
|
||||
|
||||
# How to import
|
||||
|
||||
```go
|
||||
import "github.com/xrash/smetrics"
|
||||
```
|
||||
|
||||
# Documentation
|
||||
|
||||
Go to [https://pkg.go.dev/github.com/xrash/smetrics](https://pkg.go.dev/github.com/xrash/smetrics) for complete documentation.
|
||||
|
||||
# Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/xrash/smetrics"
|
||||
)
|
||||
|
||||
func main() {
|
||||
smetrics.WagnerFischer("POTATO", "POTATTO", 1, 1, 2)
|
||||
smetrics.WagnerFischer("MOUSE", "HOUSE", 2, 2, 4)
|
||||
|
||||
smetrics.Ukkonen("POTATO", "POTATTO", 1, 1, 2)
|
||||
smetrics.Ukkonen("MOUSE", "HOUSE", 2, 2, 4)
|
||||
|
||||
smetrics.Jaro("AL", "AL")
|
||||
smetrics.Jaro("MARTHA", "MARHTA")
|
||||
|
||||
smetrics.JaroWinkler("AL", "AL", 0.7, 4)
|
||||
smetrics.JaroWinkler("MARTHA", "MARHTA", 0.7, 4)
|
||||
|
||||
smetrics.Soundex("Euler")
|
||||
smetrics.Soundex("Ellery")
|
||||
|
||||
smetrics.Hamming("aaa", "aaa")
|
||||
smetrics.Hamming("aaa", "aab")
|
||||
}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue