public class FuzzyCategoriser
extends Categoriser
Created by Boris on 01-04-2016.
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.
The categoriser 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.