org.eml.sir.rel
Class LcComparator
java.lang.Object
org.eml.sir.rel.WordRelatednessComparator
org.eml.sir.rel.PathBasedComparator
org.eml.sir.rel.LcComparator
- Direct Known Subclasses:
- LcFileWriter, WeightAdapter
- public class LcComparator
- extends PathBasedComparator
Class that provides methods that compute a relatedness value
as a result of path properties, using the method of Leacock and Chodorow
- Author:
- Katja Niemann, Simone Eberhard (EML-R)
Method Summary |
double |
getRelatedness(java.util.ArrayList word1,
java.util.ArrayList word2)
|
double |
getRelatedness(java.util.ArrayList start,
java.util.ArrayList target,
java.util.HashMap tableMap)
Return a relatedness value ESPECIALLY FOR LC_COMPARATOR!. |
double |
getRelatedness(double pathLength)
|
double |
getRelatedness(java.lang.String word1,
java.lang.String word2)
Return a relatedness value. |
java.lang.String[] |
getRelatednessTrace(java.lang.String word1,
java.lang.String word2)
Return a trace that illustrates the relatedness computation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
minPathLength
public double minPathLength
maxDepth
public double maxDepth
LcComparator
public LcComparator()
LcComparator
public LcComparator(StemmingGermaNetObject mySGNObject)
- Create a new instance of LcComparator
getRelatedness
public double getRelatedness(java.util.ArrayList start,
java.util.ArrayList target,
java.util.HashMap tableMap)
- Description copied from class:
WordRelatednessComparator
- Return a relatedness value ESPECIALLY FOR LC_COMPARATOR!.
- Specified by:
getRelatedness
in class WordRelatednessComparator
- Returns:
- A value that indicates the relatedness of two words
getRelatedness
public double getRelatedness(double pathLength)
- Returns:
- A value that indicates the relatedness of two words
getRelatednessTrace
public java.lang.String[] getRelatednessTrace(java.lang.String word1,
java.lang.String word2)
- Description copied from class:
WordRelatednessComparator
- Return a trace that illustrates the relatedness computation.
- Specified by:
getRelatednessTrace
in class WordRelatednessComparator
- Returns:
- A string array output, which is shown in the RelatednessGUI
getRelatedness
public double getRelatedness(java.lang.String word1,
java.lang.String word2)
- Description copied from class:
WordRelatednessComparator
- Return a relatedness value.
- Specified by:
getRelatedness
in class WordRelatednessComparator
- Returns:
- A positive value that indicates the relatedness of two
words. If one or both word have more than one sense the value
that indicates the highest similarity is returned. If no relatedness
value can be computed return 0.
getRelatedness
public double getRelatedness(java.util.ArrayList word1,
java.util.ArrayList word2)