- All Implemented Interfaces:
- Matcher
- Direct Known Subclasses:
- StrictMatcher
public class FuzzyMatcher
extends Object
implements Matcher
Created by Boris on 2016-04-13.
MaxDistanceAsPercentageOfWordLength is a number between 0 and 1, both inclusive.
It is there so that we can prevent e.g. 'Gun' from matching 'cat' or any other three-or-fewer letter words, even if the maxDistance is 3.
The matcher matches based on an 'AND' of maxDistance and MaxDistanceAsPercentageOfWordLength:
The distance between words has to be less than or equal to maxDistance AND
The distance between words over the length of one of the words has to be less than or equal to maxDistanceAsPercentageOfWordLength, for both words.
The matcher is case insensitive