![](/style/images/good.png)
![](/style/images/bad.png)
GitHub - wutzi15/levenshtein: A very simple implementation of the Levenshtein di...
source link: https://github.com/wutzi15/levenshtein
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Levenshtein
A very simple implementation of the Levenshtein distance in Go. The levenshtein distance is a measure of the similarity between two strings. It is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.[1]
Installation
go get github.com/wutzi15/levenshtein
Usage
func main() { fmt.Println(levenshtein.Distance("kitten", "sitting")) fmt.Println(levenshtein.Distance("Saturday", "Sunday")) }
License
MIT License
Copyright (c) 2022 Benedikt Bergenthal
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contributing
Contributing is very welcome!
References
Based on this. You can also read the wikipedia article on Levenshtein distance.
Recommend
-
203
README.md java-string-similarity
-
56
Find duplicate adresses Using the Levenshtein distance metric in SQL.
-
89
README.md string-similarity Finds degree of similarity between two strings, based on
-
28
Cocktail similarity I was recently figuring out a minimum-viable bar setup for making cocktails at home, and a system for memorizing & recording recipes. When I started writing down the first basic ingredients, I star...
-
25
Ininformation theory,linguistics andcomputer science, the Levenshtein distance is astring metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the m...
-
14
Maximising Algorithm Performance in .NET: Levenshtein Distance1,537 views•Nov 13, 2020 With per...
-
5
advancedresearch.github.io Levenshtein Heuristic in Poi by Sven Nilsen, 2020 Poi 0.18 is released! In...
-
6
Copy link Member JohnTitor comm...
-
3
[Golang] Levenshtein Distance Recursive Implementation Updated: April 05, 2017...
-
8
Instantly share code, notes, and snippets. An implementation of the Levenshtein distance algori...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK