The distance method takes two strings and returns the hamming distance between them.
The distance method takes two strings and returns the hamming distance between them.
The 1st String.
The 2nd String.
Returns the hamming distance between Strings s1 and s2.
The score method takes two strings and returns a fuzzy score (0-1) between them.
The score method takes two strings and returns a fuzzy score (0-1) between them. This mix-in implements the fuzzy score based on the distance. Score = (l - distance) / l, where l is the maximum length of strings s1 and s2.
The 1st String.
The 2nd String.
Returns the fuzzy score between Strings s1 and s2.
Implicit definition of hamming distance for HammingAlgorithm.