nvidia-container-toolkit/vendor/github.com/xrash/smetrics
dependabot[bot] bd1084d1a1
Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.3.0 to 2.27.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.3.0...v2.27.1)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 16:51:28 +00:00
..
.travis.yml Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
doc.go Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
hamming.go Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
jaro-winkler.go Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
jaro.go Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
LICENSE Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
README.md Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
soundex.go Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
ukkonen.go Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00
wagner-fischer.go Bump github.com/urfave/cli/v2 from 2.3.0 to 2.27.1 2024-02-12 16:51:28 +00:00

Build Status

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")
}