https://github.com/preciz/levenshtein
Levenshtein distance implementation in Elixir.
https://github.com/preciz/levenshtein
elixir levenshtein
Last synced: 2 months ago
JSON representation
Levenshtein distance implementation in Elixir.
- Host: GitHub
- URL: https://github.com/preciz/levenshtein
- Owner: preciz
- License: mit
- Created: 2018-07-16T15:53:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-20T22:47:54.000Z (11 months ago)
- Last Synced: 2025-03-24T09:21:17.996Z (3 months ago)
- Topics: elixir, levenshtein
- Language: Elixir
- Homepage: https://hex.pm/packages/levenshtein
- Size: 41 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Levenshtein
[](https://github.com/preciz/levenshtein/actions/workflows/test.yml)
Levenshtein distance implementation in Elixir.
Credits go to the Elixir language source code where it was removed from in 2015:
[GitHub PR](https://github.com/elixir-lang/elixir/pull/3112/commits/b962ae3e5fda2fd5b1ca28a8aa307657d33e9101).## Installation
The package can be installed
by adding `levenshtein` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:levenshtein, "~> 0.3.0"}
]
end
```## Usage
```elixir
iex> Levenshtein.distance("same", "same")
0
iex> Levenshtein.distance("this", "that")
2
iex> Levenshtein.distance("kitten", "sitting")
3
```## License
Levenshtein is [MIT licensed](LICENSE).