if (value.equals(similarityGroupValue)) {
return true;
}
}
Soundex soundex = new Soundex();
RefinedSoundex refinedSoundex = new RefinedSoundex();
Metaphone metaphone = new Metaphone();
double threshold;
if (matchMode == MatchMode.STRICT) {
threshold = STRICT_SIMILARITY_THRESHOLD;
} else {
threshold = LOOSE_SIMILARITY_THRESHOLD;
}
int soundexThreshold = (int) Math.round(threshold * 4);
for (String similarityGroupValue : similarityGroup.getValues()) {
boolean metaphoneEquals = metaphone.isMetaphoneEqual(value, similarityGroupValue);
if (metaphoneEquals) {
return true;
}
try {
int soundexDiff = soundex.difference(value, similarityGroupValue);
if (soundexDiff >= soundexThreshold) {
return true;
}
} catch (Exception e) {