[FEA] Jaro-Winkler algorithm for cudf.core.column.string.StringMethods.edit_distance
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Is your feature request related to a problem? Please describe.**
Add Jaro-Winkler algorithm for `cudf.core.column.string.StringMethods.edit_distance`.
Documentation: https://docs.rapids.ai/api/cudf/stable/api.html?highlight=tokenizer#cudf.core.column.string.StringMethods.edit_distance
**Describe the solution you'd like**
```
def edit_distance(targets, algorithm='levenshtein', **kwargs):
...
Parameters
targets array-like, Sequence or Series or str - The string(s) to measure against each string.
algorithm str - The algorithm - either Levenshtein or Jaro-Winkler.
Returns
Series or Index of int32.
Examples
```
Usage:
```
>>>
import cudf
sr = cudf.Series(["puppy", "doggy", "kitty"])
targets = cudf.Series(["pup", "dogie", "kitten"])
sr.str.edit_distance(targets=targets, algorithm='jarowinkler')
0 2
1 2
2 2
dtype: int32
sr.str.edit_distance("puppy")
0 0
1 4
2 4
dtype: int32
```
**Describe alternatives you've considered**
cuDF UDFs? Open to ideas.
**Additional context**
cc @beckernick @kkraus14
Contributor guide
Assessment
This issue has not been assessed yet.