org.eml.sir.rel
Class WordRelatednessComparator

java.lang.Object
  extended byorg.eml.sir.rel.WordRelatednessComparator
Direct Known Subclasses:
GlossaryBasedComparator, GoogleComparator, PathBasedComparator

public abstract class WordRelatednessComparator
extends java.lang.Object

Class that provides methods that are required to compute a semantic relatedness value of two words.

Author:
Hendrik Niederlich (EML-R)

Field Summary
static double noResultValue
           
 
Constructor Summary
WordRelatednessComparator()
           
 
Method Summary
 GermaNetObject getGermaNetObject()
           
abstract  double getRelatedness(java.util.ArrayList word1, java.util.ArrayList word2, java.util.HashMap tableMap)
          Return a relatedness value ESPECIALLY FOR LC_COMPARATOR!.
abstract  double getRelatedness(java.lang.String word1, java.lang.String word2)
          Return a relatedness value.
abstract  java.lang.String[] getRelatednessTrace(java.lang.String word1, java.lang.String word2)
          Return a trace that illustrates the relatedness computation.
 void setGermaNetObject(GermaNetObject gno)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

noResultValue

public static final double noResultValue
See Also:
Constant Field Values
Constructor Detail

WordRelatednessComparator

public WordRelatednessComparator()
Method Detail

getGermaNetObject

public GermaNetObject getGermaNetObject()
Returns:
Returns the gno.

setGermaNetObject

public void setGermaNetObject(GermaNetObject gno)
Parameters:
gno - The gno to set.

getRelatedness

public abstract double getRelatedness(java.lang.String word1,
                                      java.lang.String word2)
Return a relatedness value.

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 abstract double getRelatedness(java.util.ArrayList word1,
                                      java.util.ArrayList word2,
                                      java.util.HashMap tableMap)
Return a relatedness value ESPECIALLY FOR LC_COMPARATOR!.

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.

getRelatednessTrace

public abstract java.lang.String[] getRelatednessTrace(java.lang.String word1,
                                                       java.lang.String word2)
Return a trace that illustrates the relatedness computation.