Update README.md

compathelper/new_version/2020-05-20-12-03-08-092-188304956
matthieugomez 2020-03-03 06:51:05 -05:00
parent 3364329448
commit 2c6786d178
1 changed files with 3 additions and 3 deletions

View File

@ -43,12 +43,12 @@ Levenshtein()("martha", "marhta")
```
### Compare
The function `compare` is defined as 1 minus the normalized distance between two strings. It always returns a number between 0 and 1: a value of 0 means completely different and a value of 1 means completely similar.
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.
```julia
evaluate(Levenshtein(), "New York", "New York")
evaluate(Levenshtein(), "martha", "martha")
#> 0
compare("New York", "New York", Levenshtein())
compare("martha", "martha", Levenshtein())
#> 1.0
```