string_jaro_winkler
Functions
- string_jaro_winkler(first, second) ⇒
number
Calculate the Jaro-Winkler distance between two strings. Useful for sorting and fuzzy matching.
- getPrefix(a1, a2, character_limit) ⇒
number
Counts the number of common characters at the beginning of each word up to a maximum of character_limit
string_jaro_winkler(first, second) ⇒ number
Calculate the Jaro-Winkler distance between two strings. Useful for sorting and fuzzy matching.
Kind: global function
Returns: number - similarity score, higher value means strings are more similar, between 0 and 1
| Param | Type | Description |
|---|---|---|
| first | string | The string to compare |
| second | string | The string to compare with |
Example
string_jaro_winkler("Hello", "Hello") === 1
string_jaro_winkler("apple", "orange") === 0.58
string_jaro_winkler("how are you?", "are you good?") === 0.74
getPrefix(a1, a2, character_limit) ⇒ number
Counts the number of common characters at the beginning of each word up to a maximum of character_limit
Kind: global function
Returns: number - number of matching characters from the start of the string, up to limit
| Param | Type | Description |
|---|---|---|
| a1 | string | The first string to compare |
| a2 | string | The second string to compare |
| character_limit | number |