|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.applications.xmlimporter.FuzzyStringMatcher
public class FuzzyStringMatcher
Utility class, providing methods for a fuzzy comparison between strings.
| Method Summary | |
|---|---|
static float |
getMatchRate(String string1,
String string2)
Calculates the match rate, a value between 0 and 1, proportional to the rate the two strings match (1 is exact match). |
static int |
getMismatch(String string1,
String string2)
Calculates the mismatch between two strings. |
static String |
normalizeString(String str)
Creates normalized title. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int getMismatch(String string1,
String string2)
string1 - first stringstring2 - second string
public static float getMatchRate(String string1,
String string2)
string1 - first stringstring2 - second string
public static String normalizeString(String str)
str - The original title.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||