A high-performance Go library for calculating Levenshtein distance between strings, including Unicode support.
levenshtein is a Go implementation of the Levenshtein distance algorithm that calculates the minimum number of edits needed to transform one string into another. It solves the problem of measuring string similarity for applications like spell checking, fuzzy searching, and natural language processing. The library is optimized for performance and supports Unicode characters across different languages.
Go developers who need efficient string comparison functionality for text processing, search engines, data deduplication, or natural language applications. It's particularly useful for those working with international text and requiring high-performance similarity calculations.
Developers choose this library because it offers superior performance compared to alternatives, with benchmarks showing 55-60% faster execution and zero allocations for many cases. Its clean API and Unicode support make it a reliable choice for production applications needing accurate string distance calculations.
Go implementation to calculate Levenshtein Distance.
Benchmarks show it's 55-60% faster than alternatives like dgryski/trifles and arbovm/levenshtein, with significant speed improvements across ASCII, French, Nordic, and Tibetan strings.
Operates with zero allocations for many cases, reducing garbage collection pressure, as evidenced by benchmark results showing 0 B/op for common string types.
Handles non-ASCII strings including French, Nordic, and Tibetan characters seamlessly, though normalization is left to the user for flexibility.
Provides a single ComputeDistance function with clear documentation and examples, making integration straightforward for basic use cases.
As a performance optimization, it caps strings at 65,536 runes; longer strings require pinning to version 1.0.3, which may involve breaking changes or reduced functionality.
The library doesn't normalize strings, forcing users to manually handle Unicode normalization with external packages, adding complexity for international text.
Focuses solely on Levenshtein distance, lacking support for other string similarity algorithms that might be needed in broader text analysis applications.
A modern text/numeric/geo-spatial/vector indexing library for go
Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.
📚 String comparison and edit distance algorithms library, featuring : Levenshtein, LCS, Hamming, Damerau levenshtein (OSA and Adjacent transpositions algorithms), Jaro-Winkler, Cosine, etc...
Adaptive Radix Trees implemented in Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.