sorensenDice
sorensenDice(
a,b):number
Compute the Sorensen-Dice coefficient between two strings.
Compares the bigrams (pairs of consecutive characters) of the two strings after removing all whitespace; case and Unicode normalization are not adjusted. Identical strings score 1.0; otherwise a string with fewer than two characters left scores 0.0. Returns a value between 0.0 and 1.0.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
a |
string |
b |
string |
Returns
Section titled “Returns”number