org.apache.stanbol.entityhub.jersey.grefine
Class Utils
java.lang.Object
org.apache.stanbol.entityhub.jersey.grefine.Utils
public class Utils
- extends Object
|
Constructor Summary |
Utils()
|
|
Method Summary |
static double |
levenshtein(String s1,
String s2)
Compares two strings (after trimming
by using the Levenshtein's Edit Distance of the two
strings. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
levenshtein
public static double levenshtein(String s1,
String s2)
- Compares two strings (after
trimming
by using the Levenshtein's Edit Distance of the two
strings. Does not return the Integer number of changes but
1-(changes/maxStringSizeAfterTrim)
- Parameters:
s1 - the first strings2 - the second string
- Returns:
- the distance
- Throws:
IllegalArgumentException - if any of the two parsed strings is NULL
Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.