* faster and more accurate (in most cases) name matchings

This commit is contained in:
Reinhard Pointner 2009-07-05 19:17:03 +00:00
parent 955c83bfd9
commit 2a291d57c0
1 changed files with 5 additions and 6 deletions

View File

@ -3,10 +3,9 @@ package net.sourceforge.filebot.similarity;
import static net.sourceforge.filebot.FileBotUtilities.*; import static net.sourceforge.filebot.FileBotUtilities.*;
import uk.ac.shef.wit.simmetrics.similaritymetrics.AbstractStringMetric; import uk.ac.shef.wit.simmetrics.similaritymetrics.AbstractStringMetric;
import uk.ac.shef.wit.simmetrics.similaritymetrics.MongeElkan; import uk.ac.shef.wit.simmetrics.similaritymetrics.QGramsDistance;
import uk.ac.shef.wit.simmetrics.tokenisers.TokeniserQGram3Extended; import uk.ac.shef.wit.simmetrics.tokenisers.TokeniserQGram3;
public class NameSimilarityMetric implements SimilarityMetric { public class NameSimilarityMetric implements SimilarityMetric {
@ -15,8 +14,8 @@ public class NameSimilarityMetric implements SimilarityMetric {
public NameSimilarityMetric() { public NameSimilarityMetric() {
// MongeElkan metric with a QGram3Extended tokenizer seems to work best for similarity of names // QGramsDistance with a word tokenizer seems to work best for similarity of names
metric = new MongeElkan(new TokeniserQGram3Extended()); metric = new QGramsDistance(new TokeniserQGram3());
} }