tokenSetPartialRatio function

int tokenSetPartialRatio(
  1. String s1,
  2. String s2
)

Splits the strings into tokens and computes intersections and remainders between the tokens of the two strings. A comparison string is then built up and is compared using the partial ratio algorithm. Useful for strings where words appear redundantly.

Implementation

int tokenSetPartialRatio(String s1, String s2) {
  return TokenSet().apply(s1, s2, PartialRatio());
}