diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-05 22:03:19 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-05 22:33:03 +0100 |
commit | 1d4bb7ceb0cef79d68df0bacc913b01e40e6ddd6 (patch) | |
tree | e088b0fa43058afde1db71541d8fcb4b94905d6e /vendor/github.com/agnivade/levenshtein/README.md | |
parent | f093be96e98284580d61664adecd0a2ff8b354e4 (diff) | |
download | git-bug-1d4bb7ceb0cef79d68df0bacc913b01e40e6ddd6.tar.gz |
migrate to go modules
Diffstat (limited to 'vendor/github.com/agnivade/levenshtein/README.md')
-rw-r--r-- | vendor/github.com/agnivade/levenshtein/README.md | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/vendor/github.com/agnivade/levenshtein/README.md b/vendor/github.com/agnivade/levenshtein/README.md deleted file mode 100644 index b0fd81df..00000000 --- a/vendor/github.com/agnivade/levenshtein/README.md +++ /dev/null @@ -1,57 +0,0 @@ -levenshtein [![Build Status](https://travis-ci.org/agnivade/levenshtein.svg?branch=master)](https://travis-ci.org/agnivade/levenshtein) [![Go Report Card](https://goreportcard.com/badge/github.com/agnivade/levenshtein)](https://goreportcard.com/report/github.com/agnivade/levenshtein) [![GoDoc](https://godoc.org/github.com/agnivade/levenshtein?status.svg)](https://godoc.org/github.com/agnivade/levenshtein) -=========== - -[Go](http://golang.org) package to calculate the [Levenshtein Distance](http://en.wikipedia.org/wiki/Levenshtein_distance) - -The library is fully capable of working with non-ascii strings. But the strings are not normalized. That is left as a user-dependant use case. Please normalize the strings before passing it to the library if you have such a requirement. -- https://blog.golang.org/normalization - -Install -------- - - go get github.com/agnivade/levenshtein - -Example -------- - -```go -package main - -import ( - "fmt" - "github.com/agnivade/levenshtein" -) - -func main() { - s1 := "kitten" - s2 := "sitting" - distance := levenshtein.ComputeDistance(s1, s2) - fmt.Printf("The distance between %s and %s is %d.\n", s1, s2, distance) - // Output: - // The distance between kitten and sitting is 3. -} - -``` - -Benchmarks ----------- - -``` -name time/op -Simple/ASCII-4 537ns ± 2% -Simple/French-4 956ns ± 0% -Simple/Nordic-4 1.95µs ± 1% -Simple/Tibetan-4 1.53µs ± 2% - -name alloc/op -Simple/ASCII-4 96.0B ± 0% -Simple/French-4 128B ± 0% -Simple/Nordic-4 192B ± 0% -Simple/Tibetan-4 144B ± 0% - -name allocs/op -Simple/ASCII-4 1.00 ± 0% -Simple/French-4 1.00 ± 0% -Simple/Nordic-4 1.00 ± 0% -Simple/Tibetan-4 1.00 ± 0% -``` |