This commit is contained in:
Reinhard Pointner 2019-02-02 22:23:24 +07:00
parent d3f2a15234
commit 50a5d9779f
1 changed files with 5 additions and 13 deletions

View File

@ -22,19 +22,11 @@ public class NameSimilarityMetric implements SimilarityMetric {
}
protected String normalize(Object object) {
// use string representation
String name = object.toString();
// apply transliterator
if (transliterator != null) {
name = transliterator.transform(name);
}
// normalize separators
name = normalizePunctuation(name);
// normalize case and trim
return name.toLowerCase();
// 1. use string representation
// 2. apply transliterator
// 3. normalize separators
// 4. normalize case and trim
return normalizePunctuation(transliterator.transform(object.toString())).toLowerCase();
}
}