org.eml.sir.rel
Class PathBasedComparator

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

public abstract class PathBasedComparator
extends WordRelatednessComparator

Class that provides methods that are required to compute a relatedness value as a result of path properties.

Author:
Hendrik Niederlich, Katja Niemann, Simone Eberhard (EML-R)

Field Summary
 
Fields inherited from class org.eml.sir.rel.WordRelatednessComparator
noResultValue
 
Constructor Summary
PathBasedComparator()
          Create a new instance of PathBasedComparator.
PathBasedComparator(GermaNetObject myGNObject)
          Create a new instance of PathBasedComparator.
PathBasedComparator(StemmingGermaNetObject mySGNObject)
          Create a new instance of PathBasedComparator.
 
Method Summary
 java.util.HashSet getLCSs(Synset set1, Synset set2)
          Return least common subsumers.
 int getMaxDepth(GermaNetObject gno)
          A method that gets the maximum depth of a taxonomy(for nouns) in GermaNet
 double getMinPathLength(java.util.ArrayList value, java.util.HashMap tableMap)
          get the minimum pathlength between two Synsets, adding edge weights (relations in ArrayList value, values in HashMap tableMap) from already computed shortest (edge count!) paths
 double getMinPathLength(StemmingGermaNetObject sgno, java.util.ArrayList alStart, java.util.ArrayList alTarget, java.util.HashMap tableMap)
          getMinPathLength(GermaNetObject gno, ArrayList, ArrayList) using the Dijkstra Algorithm, starting from start and target and determining when the paths meet
 java.util.ArrayList getPathsToRoot(Synset set)
           
 
Methods inherited from class org.eml.sir.rel.WordRelatednessComparator
getGermaNetObject, getRelatedness, getRelatedness, getRelatednessTrace, setGermaNetObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathBasedComparator

public PathBasedComparator()
Create a new instance of PathBasedComparator.


PathBasedComparator

public PathBasedComparator(GermaNetObject myGNObject)
Create a new instance of PathBasedComparator.


PathBasedComparator

public PathBasedComparator(StemmingGermaNetObject mySGNObject)
Create a new instance of PathBasedComparator.

Method Detail

getLCSs

public java.util.HashSet getLCSs(Synset set1,
                                 Synset set2)
Return least common subsumers.

Returns:
HashSet that contains Synsets with that are the least commn subsumers of the synsets.

getPathsToRoot

public java.util.ArrayList getPathsToRoot(Synset set)
See Also:
PathFinder.getPathsToRoot(org.eml.sir.gn.Synset)

getMinPathLength

public double getMinPathLength(StemmingGermaNetObject sgno,
                               java.util.ArrayList alStart,
                               java.util.ArrayList alTarget,
                               java.util.HashMap tableMap)
getMinPathLength(GermaNetObject gno, ArrayList, ArrayList) using the Dijkstra Algorithm, starting from start and target and determining when the paths meet

Returns:
double shortest pathlength between start and target

getMinPathLength

public double getMinPathLength(java.util.ArrayList value,
                               java.util.HashMap tableMap)
get the minimum pathlength between two Synsets, adding edge weights (relations in ArrayList value, values in HashMap tableMap) from already computed shortest (edge count!) paths

Returns:
double shortest pathlength between start and target

getMaxDepth

public int getMaxDepth(GermaNetObject gno)
A method that gets the maximum depth of a taxonomy(for nouns) in GermaNet