org.eml.sir.rel
Class ResComparator
java.lang.Object
org.eml.sir.rel.WordRelatednessComparator
org.eml.sir.rel.PathBasedComparator
org.eml.sir.rel.InformationBasedComparator
org.eml.sir.rel.ResComparator
- public class ResComparator
- extends InformationBasedComparator
Computes the relatedness value based on the calculation concept
of Resnik (1995).
- Author:
- Hendrik Niederlich (EML-R)
Method Summary |
double |
getRelatedness(java.util.ArrayList word1,
java.util.ArrayList word2,
java.util.HashMap tableMap)
Return a relatedness value ESPECIALLY FOR LC_COMPARATOR!. |
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 |
ResComparator
public ResComparator()
- Create a new instance of ResComparator.
ResComparator
public ResComparator(StemmingGermaNetObject sgno)
- Create a new instance of ResComparator.
getRelatedness
public double getRelatedness(java.util.ArrayList word1,
java.util.ArrayList word2,
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 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.lang.String word1,
java.lang.String word2)
- Return a relatedness value.
- Specified by:
getRelatedness
in class WordRelatednessComparator
- Returns:
- A positive value that indicates the relatedness of two
words.
- See Also:
WordRelatednessComparator.getRelatedness(java.lang.String, java.lang.String)
getRelatednessTrace
public java.lang.String[] getRelatednessTrace(java.lang.String word1,
java.lang.String word2)
- Return a trace that illustrates the relatedness computation.
- Specified by:
getRelatednessTrace
in class WordRelatednessComparator
- See Also:
WordRelatednessComparator.getRelatednessTrace(java.lang.String, java.lang.String)