|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectOntologyEntityFinder.StringOperation
public class StringOperation
Utility Class for string operations
Field Summary | |
---|---|
private static java.util.Hashtable<java.lang.String,java.lang.Double> |
alreadyComp
Store the words already computed to avoid useless computations |
private static java.util.Hashtable<java.lang.String,java.lang.String> |
convertWord
|
static int |
counter
counter for performance evaluation |
private static java.util.LinkedList<java.lang.String> |
discardWord
list to modify the result of the split |
private static uk.ac.shef.wit.simmetrics.similaritymetrics.JaroWinkler |
jarowin
|
private static edu.sussex.nlp.jws.Lin |
lin
|
private static boolean |
useWordNet
|
private static edu.sussex.nlp.jws.JWS |
ws
Similarity constructor and measures |
private static edu.sussex.nlp.jws.WuAndPalmer |
wup
|
Constructor Summary | |
---|---|
StringOperation(boolean useWN)
Standard constructor |
Method Summary | |
---|---|
static double |
compareWord(java.lang.String word1,
java.lang.String word2)
Compare two words |
static java.lang.String |
getSubStringWithCondition(java.lang.String str,
java.lang.String mustContain,
java.lang.String delimiter,
boolean startDelimiter)
Get the substring between the two delimiters characters if startDelimiter is true or between the end of the string that must be contained and the delimiter character otherwise. |
static java.lang.String |
removeSpe(java.lang.String str)
Remove all the special characters from the string |
static java.util.LinkedList<java.lang.String> |
split(java.lang.String s)
Splits a string into a list of words |
private static java.util.LinkedList<java.lang.String> |
splitWN(java.lang.String s)
Split the words using a test based on their presence in the WordNet dictionary |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int counter
private static java.util.Hashtable<java.lang.String,java.lang.Double> alreadyComp
private static edu.sussex.nlp.jws.JWS ws
private static edu.sussex.nlp.jws.Lin lin
private static edu.sussex.nlp.jws.WuAndPalmer wup
private static uk.ac.shef.wit.simmetrics.similaritymetrics.JaroWinkler jarowin
private static boolean useWordNet
private static java.util.LinkedList<java.lang.String> discardWord
private static java.util.Hashtable<java.lang.String,java.lang.String> convertWord
Constructor Detail |
---|
public StringOperation(boolean useWN)
useWN
- will use WordNet Similarity if true and only String similarity if falseMethod Detail |
---|
private static java.util.LinkedList<java.lang.String> splitWN(java.lang.String s)
s
- The string to split
public static java.util.LinkedList<java.lang.String> split(java.lang.String s)
s
- the string to split
public static double compareWord(java.lang.String word1, java.lang.String word2)
word1
- the word to compare with word2word2
- the word to compare with word1
public static java.lang.String removeSpe(java.lang.String str)
str
- the string to simplify
public static java.lang.String getSubStringWithCondition(java.lang.String str, java.lang.String mustContain, java.lang.String delimiter, boolean startDelimiter)
str
- the input stringmustContain
- the string that must be contained in strdelimiter
- the delimiter characterstartDelimiter
- determine where the substring should start
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |