org.eml.sir.rel
Class WeightAdapter

java.lang.Object
  extended byorg.eml.sir.rel.WordRelatednessComparator
      extended byorg.eml.sir.rel.PathBasedComparator
          extended byorg.eml.sir.rel.LcComparator
              extended byorg.eml.sir.rel.WeightAdapter

public class WeightAdapter
extends LcComparator

Class that provides methods for computing ideal weights for the shortest paths using a kind of gradient method

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

Field Summary
 
Fields inherited from class org.eml.sir.rel.LcComparator
maxDepth, minPathLength
 
Fields inherited from class org.eml.sir.rel.WordRelatednessComparator
noResultValue
 
Constructor Summary
WeightAdapter(java.lang.String x_pathToGoldStandard, java.lang.String x_inputFile, java.lang.String x_parameterTable, java.lang.String x_stemmerName, java.lang.String x_doTag, java.lang.String x_splitCompounds)
          Constructor
 
Method Summary
 void addDice(java.util.ArrayList dice)
          add small random vector to the values of the edge weight table (table.txt) in the hope of better correlation
 double getCorrelation(java.util.ArrayList relatednessValues)
          compute correlation between relatedness results and gold standard see http://de.wikipedia.org/wiki/Korrelationskoeffizient
 java.util.ArrayList getRelatednessValues()
          write relatedness values of all word pairs in an arraylist, see LcComparator
 void getWeights()
          try different weights, keep the ones, which improve the correlation most
 void subDice(java.util.ArrayList dice)
          subtract the small random vector to the values of the edge weight table (table.txt) if the correlation got worse
 
Methods inherited from class org.eml.sir.rel.LcComparator
getRelatedness, getRelatedness, getRelatedness, getRelatedness, getRelatednessTrace
 
Methods inherited from class org.eml.sir.rel.PathBasedComparator
getLCSs, getMaxDepth, getMinPathLength, getMinPathLength, getPathsToRoot
 
Methods inherited from class org.eml.sir.rel.WordRelatednessComparator
getGermaNetObject, setGermaNetObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightAdapter

public WeightAdapter(java.lang.String x_pathToGoldStandard,
                     java.lang.String x_inputFile,
                     java.lang.String x_parameterTable,
                     java.lang.String x_stemmerName,
                     java.lang.String x_doTag,
                     java.lang.String x_splitCompounds)
Constructor

Method Detail

getRelatednessValues

public java.util.ArrayList getRelatednessValues()
write relatedness values of all word pairs in an arraylist, see LcComparator


getCorrelation

public double getCorrelation(java.util.ArrayList relatednessValues)
compute correlation between relatedness results and gold standard see http://de.wikipedia.org/wiki/Korrelationskoeffizient


addDice

public void addDice(java.util.ArrayList dice)
add small random vector to the values of the edge weight table (table.txt) in the hope of better correlation


subDice

public void subDice(java.util.ArrayList dice)
subtract the small random vector to the values of the edge weight table (table.txt) if the correlation got worse


getWeights

public void getWeights()
try different weights, keep the ones, which improve the correlation most