|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.ontology.clustering.LocalitySensitiveWordSpaceClustering
public class LocalitySensitiveWordSpaceClustering
This class creates a soft cluster for a subset of the words in a word space based on the similarity lists generated. This class can be serialized and deserialized easily so that other codes can retrieve the similarity values.
Constructor Summary | |
---|---|
LocalitySensitiveWordSpaceClustering(edu.ucla.sspace.common.SemanticSpace sspace,
int numClusters,
int numBasisVectors,
int numPermutations,
int numNeighbors,
double threshold)
Creates a new LocalitySensitiveWordSpaceClustering by generating
similarity lists with a LocalitySensitiveSimilarityListGenerator
and then saving only a small portion of those similarity lists. |
Method Summary | |
---|---|
double |
getTermSimilarity(String term1,
String term2)
Returns the similarity between term1 and term2 . |
static void |
main(String[] args)
|
String |
toString()
Returns "lsh_" + the name of the sspace algorithm used to generate the cluster assignments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocalitySensitiveWordSpaceClustering(edu.ucla.sspace.common.SemanticSpace sspace, int numClusters, int numBasisVectors, int numPermutations, int numNeighbors, double threshold)
LocalitySensitiveWordSpaceClustering
by generating
similarity lists with a LocalitySensitiveSimilarityListGenerator
and then saving only a small portion of those similarity lists. Similarity
lists that are maintained become clusters, and each word in the remaining
word space can be placed in several clusters.
Method Detail |
---|
public static void main(String[] args)
public double getTermSimilarity(String term1, String term2)
term1
and term2
. If both
terms are in the same cluster, their similarity is the minimum similarity
of the cosine similarity for each term to the clusters centroid, otherwise
it is 0.
getTermSimilarity
in interface ClusterSimilarity
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |