Update README.md

pull/57/head v0.11.0
matthieugomez 2021-09-13 14:48:21 -04:00
parent cee5db756b
commit a78aed0e99
1 changed files with 7 additions and 2 deletions

View File

@ -25,7 +25,7 @@ The available distances are:
- [Normalized Multiset Distance](https://www.sciencedirect.com/science/article/pii/S1047320313001417) `NMD(q::Int) <: SemiMetric`
## Basic Use
## Syntax
### distance
The distance between two strings can be computed using the following syntax:
@ -39,6 +39,11 @@ For instance, with the `Levenshtein` distance,
Levenshtein()("martha", "marhta")
```
You can also use `evaluate`
```julia
evaluate(Levenshtein(), "martha", "marhta")
```
### pairwise
`pairwise` returns the matrix of distance between two `AbstractVectors` of AbstractStrings (or iterators)
@ -77,7 +82,7 @@ The package also adds some convience function to find the element in a list that
findall(s, itr, dist::StringDistance; min_score = 0.8)
```
The functions `findnearest` and `findall` are particularly optimized for the `Levenshtein` and `OptimalStringAlignement` distances (these distances stop early if the distance is higher than a certain threshold).
The functions `findnearest` and `findall` are particularly optimized for the `Levenshtein` and `OptimalStringAlignement` distances (these algorithm stops as soon as the distance is higher than a certain threshold).
## Notes