gov.llnl.ontology.clustering
Class WordSpaceClusterSimilarity

java.lang.Object
  extended by gov.llnl.ontology.clustering.WordSpaceClusterSimilarity
All Implemented Interfaces:
ClusterSimilarity, Serializable

public class WordSpaceClusterSimilarity
extends Object
implements ClusterSimilarity, Serializable

See Also:
Serialized Form

Constructor Summary
WordSpaceClusterSimilarity(edu.ucla.sspace.common.SemanticSpace sspace, edu.ucla.sspace.clustering.Assignments assignments)
           
 
Method Summary
 double getTermSimilarity(String term1, String term2)
          Returns the similarity between term1 and term2.
static void main(String[] args)
           
 String toString()
          Returns "cluster_" + 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

WordSpaceClusterSimilarity

public WordSpaceClusterSimilarity(edu.ucla.sspace.common.SemanticSpace sspace,
                                  edu.ucla.sspace.clustering.Assignments assignments)
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

getTermSimilarity

public double getTermSimilarity(String term1,
                                String term2)
Returns the similarity between 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.

Specified by:
getTermSimilarity in interface ClusterSimilarity

toString

public String toString()
Returns "cluster_" + the name of the sspace algorithm used to generate the cluster assignments.

Overrides:
toString in class Object


Copyright © 2010-2011. All Rights Reserved.