Renovate Bot
b792a8f374
Some checks are pending
Dev Version / Release (push) Waiting to run
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/urfave/cli/v2](https://github.com/urfave/cli) | require | minor | `v2.25.7` -> `v2.27.4` | > ❗ **Important** > > Release Notes retrieval for this PR were skipped because no github.com credentials were available. > If you are self-hosted, please see [this instruction](https://github.com/renovatebot/renovate/blob/master/docs/usage/examples/self-hosting.md#githubcom-token-for-release-notes). --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMS4yIiwidXBkYXRlZEluVmVyIjoiMzguMjEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: #5 Co-authored-by: Renovate Bot <renovate@keks.cloud> Co-committed-by: Renovate Bot <renovate@keks.cloud> |
||
---|---|---|
.. | ||
.travis.yml | ||
doc.go | ||
hamming.go | ||
jaro-winkler.go | ||
jaro.go | ||
LICENSE | ||
README.md | ||
soundex.go | ||
ukkonen.go | ||
wagner-fischer.go |
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
import "github.com/xrash/smetrics"
Documentation
Go to https://pkg.go.dev/github.com/xrash/smetrics for complete documentation.
Example
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")
}