evaluate examples
parent
28ef77ea5f
commit
b7097c868d
|
@ -95,8 +95,14 @@ The package includes distance "modifiers", that can be applied to any distance.
|
||||||
```
|
```
|
||||||
## Evaluate vs Compare
|
## Evaluate vs Compare
|
||||||
The function `evaluate` returns the litteral distance between two strings, with a value of 0 being completely similar.
|
The function `evaluate` returns the litteral distance between two strings, with a value of 0 being completely similar.
|
||||||
The function `compare` is the opposite of `evaluate': a value of 0 means completely different and a value of 1 means completely similar.
|
The function `compare` is the opposite of `evaluate`: a value of 0 means completely different and a value of 1 means completely similar.
|
||||||
|
|
||||||
|
```
|
||||||
|
evaluate(Levenshtein(), "New York", "New York")
|
||||||
|
#> 0
|
||||||
|
compare(Levenshtein(), "New York", "New York")
|
||||||
|
#> 1.0
|
||||||
|
```
|
||||||
|
|
||||||
## Which distance should I use?
|
## Which distance should I use?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue