public class WNsim extends Object
| Constructor and Description |
|---|
WNsim() |
| Modifier and Type | Method and Description |
|---|---|
static void |
calcMaxFreqs() |
static HashMap<String,Integer> |
computeSubsumingFreq(HashSet<String> childRels,
HashSet<String> parentRels) |
static int |
computeSubsumingFreq2(HashSet<String> childRels,
HashSet<String> parentRels) |
static int |
computeSubsumingFreq2(String synset,
HashSet<String> childRels,
HashSet<String> parentRels) |
static float |
computeSynsetSim(String s1,
String s2)
Compute similarity of two synsets.
|
static float |
computeWordSim(String s1,
String s2)
Compute similarity of two words as the maximum similarity among
their possible synsets.
|
static double |
correlation(HashMap<String,Float> x,
HashMap<String,Float> y)
determine the sample correlation coefficient
|
static float |
deviation(HashMap<String,Float> x,
HashMap<String,Float> y,
float meanx,
float meany) |
static HashMap<String,Integer> |
getSubsumingFreq() |
static void |
main(String[] args)
A main method, used only for testing.
|
static float |
mean(HashMap<String,Float> x) |
static HashMap<String,HashMap<String,Float>> |
readTestFile(String filename,
String regex,
boolean removePOS)
Read a space-delimited file of word pairs and their similarity
rating.
|
static float |
sqDeviation(HashMap<String,Float> x,
float mean) |
static void |
test() |
public static void calcMaxFreqs()
public static HashMap<String,Integer> computeSubsumingFreq(HashSet<String> childRels, HashSet<String> parentRels)
public static int computeSubsumingFreq2(HashSet<String> childRels, HashSet<String> parentRels)
public static int computeSubsumingFreq2(String synset, HashSet<String> childRels, HashSet<String> parentRels)
public static float computeSynsetSim(String s1, String s2)
public static float computeWordSim(String s1, String s2)
public static HashMap<String,HashMap<String,Float>> readTestFile(String filename, String regex, boolean removePOS)
public static float deviation(HashMap<String,Float> x, HashMap<String,Float> y, float meanx, float meany)
public static double correlation(HashMap<String,Float> x, HashMap<String,Float> y)
public static void test()
public static void main(String[] args)
Copyright © 2015. All rights reserved.