org.eml.sir.rel
Class LcFileWriter

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.LcFileWriter

public class LcFileWriter
extends LcComparator

Class, that provides methods for comparing different path weights; store paths of word pairs in a hashtable and serialize it, deserialize the hashtable and compute new pathlengths for changed path weights (table.txt) and write them in a .csv file

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
LcFileWriter(StemmingGermaNetObject mySGNObject)
           
 
Method Summary
 java.util.Hashtable deserializeResultHt(java.lang.String serFileName)
          Deserialize a given .ser file
 java.util.Hashtable getMinPaths(StemmingGermaNetObject sgno, java.util.ArrayList alStart, java.util.ArrayList alTarget, java.util.Hashtable htResult, java.util.ArrayList alKey, java.util.HashMap tableMap)
          getMinPaths(StemmingGermaNetObject sgno, ArrayList, ArrayList)
 void serializeResultHt(java.util.Hashtable htResult, java.lang.String serFileName)
          Serialize a given hashtable
 void writeRelatednessCSV(java.lang.String serFileName, java.lang.String outputFile, java.util.HashMap tableMap)
          Write a .csv file containing the word pair, the path length and a relatedness value
 
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

LcFileWriter

public LcFileWriter(StemmingGermaNetObject mySGNObject)
Method Detail

getMinPaths

public java.util.Hashtable getMinPaths(StemmingGermaNetObject sgno,
                                       java.util.ArrayList alStart,
                                       java.util.ArrayList alTarget,
                                       java.util.Hashtable htResult,
                                       java.util.ArrayList alKey,
                                       java.util.HashMap tableMap)
getMinPaths(StemmingGermaNetObject sgno, ArrayList, ArrayList)

Returns:
hashtable with shortest paths between starts and targets

serializeResultHt

public void serializeResultHt(java.util.Hashtable htResult,
                              java.lang.String serFileName)
Serialize a given hashtable

Returns:
void

deserializeResultHt

public java.util.Hashtable deserializeResultHt(java.lang.String serFileName)
Deserialize a given .ser file

Returns:
Hashtable

writeRelatednessCSV

public void writeRelatednessCSV(java.lang.String serFileName,
                                java.lang.String outputFile,
                                java.util.HashMap tableMap)
Write a .csv file containing the word pair, the path length and a relatedness value