added method to set the SimilarityThreshold based on the edit distance