Skip to content

giacomocavalieri/edit_distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

edit_distance

Package Version Hex Docs CI

๐Ÿ“ A pure Gleam package to compute the edit distance of two strings

โš™๏ธ This package supports the Erlang and JavaScript targets!

Installation

To add this package to your Gleam project:

gleam add edit_distance

Usage

To use the package, you can import the module corresponding to one of the metrics and call the distance function. For example, to compute the edit distance of two strings using the Levenshtein distance you can:

import edit_distance/levenshtein
levenshtein.distance("gleam", "beam")
// -> 2

Future plans

For now the only implemented algorithm is the Levenshtein distance, but I'd like to add more: for sure the Damerau-Levenshtein distance would be a useful future addition!

Contributing

If you think there's any way to improve this package, or if you spot a bug don't be afraid to open PRs, issues or requests of any kind! Any contribution is welcome ๐Ÿ’œ

Aknowledgments

Credits for the Levenshtein distance implementation go to the Levenshtein Elixir library!

About

๐Ÿ“ A pure Gleam package to compute the edit distance of two strings

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages