weightedRatio function

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

Calculates a weighted ratio between s1 and s2 using the best option from the above fuzzy matching algorithms

Example:

weightedRatio("The quick brown fox jimps ofver the small lazy dog", "the quick brown fox jumps over the small lazy dog") // 97

Implementation

int weightedRatio(String s1, String s2) {
  return WeightedRatio().apply(s1.toLowerCase(), s2.toLowerCase());
}