From 5b768bd8e116bdef8f3edd0ed54c3de7b5710623 Mon Sep 17 00:00:00 2001 From: matthieugomez Date: Mon, 13 Jul 2020 08:59:33 -0700 Subject: [PATCH] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f08f46e..79528a8 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ The package is registered in the [`General`](https://github.com/JuliaRegistries/General) registry and so can be installed at the REPL with `] add StringDistances`. ## Supported Distances + +Each distance can be computed on iterators that defines a `length` function (which includes `AbstractStrings`, `graphemes` and `AbstractVector`) + The available distances are: - Edit Distances @@ -42,11 +45,6 @@ evaluate(Levenshtein(), "martha", "marhta") Levenshtein()("martha", "marhta") ``` -You can also compute a distance between two iterators: -```julia -evaluate(Levenshtein(), [1, 5, 6], [1, 6, 5]) -2 -``` ### Compare The function `compare` is defined as 1 minus the normalized distance between two strings. It always returns a `Float64` between 0 and 1: a value of 0 means completely different and a value of 1 means completely similar.