|
Alignment API and Server 3.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.inrialpes.exmo.align.ling.JWNLDistances
public class JWNLDistances
Compute a string distance using the JWNL API (WordNet API)
Field Summary | |
---|---|
static double |
ADJ_WEIGHT
|
private Hashtable |
adjectives1
|
private Hashtable |
adjectives2
|
(package private) double[][] |
adjectivesMasks
|
(package private) double[][] |
adjectivesResults
|
private static double |
MINIMUM_DISTANCE
|
static double |
NOUN_WEIGHT
|
private Hashtable |
nouns1
|
private Hashtable |
nouns2
|
(package private) double[][] |
nounsMasks
|
(package private) double[][] |
nounsResults
|
static double |
VERB_WEIGHT
|
private Hashtable |
verbs1
|
private Hashtable |
verbs2
|
(package private) double[][] |
verbsMasks
|
(package private) double[][] |
verbsResults
|
Constructor Summary | |
---|---|
JWNLDistances()
|
Method Summary | |
---|---|
double |
basicGlossOverlap(String s1,
String s2)
NOT FINISHED Compute the overlap between all glosses of two strings |
double |
basicSynonymDistance(String s1,
String s2)
Compute a basic distance between 2 strings using WordNet synonym. |
double |
basicSynonymySimilarity(String s1,
String s2)
Evaluate if two terms can be synonym |
private double |
bestMatch(double[][] matrix)
|
double |
compareComponentNames(String s1,
String s2)
|
double |
computeSimilarity(String s1,
String s2)
|
double |
computeTokenSimilarity(net.didion.jwnl.data.IndexWord index1,
net.didion.jwnl.data.IndexWord index2)
|
double |
cosynonymySimilarity(String s1,
String s2)
Compute the proportion of common synset between two words |
void |
display(net.didion.jwnl.data.Synset syn)
|
void |
displayMatrix(double[][] matrix)
|
void |
fillWithOnes(double[][] matrix)
|
double |
findMatchForAdj(net.didion.jwnl.data.IndexWord index1,
net.didion.jwnl.data.IndexWord index2)
|
double[][] |
getAdjectivesResults()
|
(package private) Set<net.didion.jwnl.data.Synset> |
getAllSenses(String term)
Retrieve all WordNet sense of a term |
int |
getCommonConcepts(net.didion.jwnl.data.list.PointerTargetNodeList list1,
net.didion.jwnl.data.list.PointerTargetNodeList list2)
|
double[][] |
getNounsResults()
|
int |
getNumberOfOccurences(String token,
Hashtable nouns,
Hashtable adj,
Hashtable verbs)
|
int |
getNumberOfOccurences(String token,
int n)
|
double[][] |
getVerbsResults()
|
void |
Initialize()
Initialize the JWNL API. |
void |
Initialize(String wordnetdir,
String wordnetversion)
|
void |
lookUpWord(String word,
Hashtable<String,net.didion.jwnl.data.IndexWord> nouns,
Hashtable<String,net.didion.jwnl.data.IndexWord> adjectives,
Hashtable<String,net.didion.jwnl.data.IndexWord> verbs)
|
double |
wuPalmerSimilarity(String s1,
String s2)
Compute the Wu-Palmer similarity defined by score = 2*depth(lcs(s1,s2)) / (depth(s1) + depth(s2)) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double NOUN_WEIGHT
public static final double ADJ_WEIGHT
public static final double VERB_WEIGHT
private static final double MINIMUM_DISTANCE
double[][] nounsResults
double[][] verbsResults
double[][] adjectivesResults
double[][] nounsMasks
double[][] verbsMasks
double[][] adjectivesMasks
private Hashtable nouns1
private Hashtable adjectives1
private Hashtable verbs1
private Hashtable nouns2
private Hashtable adjectives2
private Hashtable verbs2
Constructor Detail |
---|
public JWNLDistances()
Method Detail |
---|
public void Initialize() throws AlignmentException
AlignmentException
public void Initialize(String wordnetdir, String wordnetversion) throws AlignmentException
AlignmentException
public double basicSynonymDistance(String s1, String s2)
s1
- s2
-
Set<net.didion.jwnl.data.Synset> getAllSenses(String term) throws AlignmentException
term
-
AlignmentException
public double cosynonymySimilarity(String s1, String s2) throws AlignmentException
s1
- s2
-
AlignmentException
public double basicSynonymySimilarity(String s1, String s2) throws AlignmentException
s1
- s2
-
AlignmentException
public double basicGlossOverlap(String s1, String s2) throws AlignmentException
s1
- s2
-
AlignmentException
public double wuPalmerSimilarity(String s1, String s2) throws AlignmentException
s1
- s2
-
AlignmentException
public double computeSimilarity(String s1, String s2)
public double compareComponentNames(String s1, String s2)
public double computeTokenSimilarity(net.didion.jwnl.data.IndexWord index1, net.didion.jwnl.data.IndexWord index2)
public double findMatchForAdj(net.didion.jwnl.data.IndexWord index1, net.didion.jwnl.data.IndexWord index2)
public void lookUpWord(String word, Hashtable<String,net.didion.jwnl.data.IndexWord> nouns, Hashtable<String,net.didion.jwnl.data.IndexWord> adjectives, Hashtable<String,net.didion.jwnl.data.IndexWord> verbs)
word
- public void display(net.didion.jwnl.data.Synset syn)
public int getCommonConcepts(net.didion.jwnl.data.list.PointerTargetNodeList list1, net.didion.jwnl.data.list.PointerTargetNodeList list2)
private double bestMatch(double[][] matrix)
public int getNumberOfOccurences(String token, int n)
token
- A token.n
- The number of the ontology (typically 1 or 2).
public int getNumberOfOccurences(String token, Hashtable nouns, Hashtable adj, Hashtable verbs)
public void displayMatrix(double[][] matrix)
public void fillWithOnes(double[][] matrix)
public double[][] getAdjectivesResults()
public double[][] getNounsResults()
public double[][] getVerbsResults()
|
Alignment API and Server 3.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |