org.eml.sir.rel
Class LcFileWriter
java.lang.Object
org.eml.sir.rel.WordRelatednessComparator
org.eml.sir.rel.PathBasedComparator
org.eml.sir.rel.LcComparator
org.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)
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LcFileWriter
public LcFileWriter(StemmingGermaNetObject mySGNObject)
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