Package org.carrot2.clustering
Class Cluster<T>
java.lang.Object
org.carrot2.clustering.Cluster<T>
public class Cluster<T> extends Object
A cluster is a named group of somehow related entities.
-
Constructor Summary
Constructors Constructor Description Cluster() -
Method Summary
Modifier and Type Method Description Cluster<T>addCluster(Cluster<T> cluster)Adds a child cluster to this cluster.Cluster<T>addDocument(T document)Add a single document to this cluster.Cluster<T>addLabel(String label)Add a single label to this cluster.booleanequals(Object obj)List<Cluster<T>>getClusters()Returns all child clusters belonging to this cluster.List<T>getDocuments()Returns all documents that belong directly to this cluster.List<String>getLabels()DoublegetScore()Returns this cluster's score or null, if not available.inthashCode()Cluster<T>setScore(Double score)Sets this cluster's score.StringtoString()
-
Constructor Details
-
Cluster
public Cluster()
-
-
Method Details
-
getLabels
- Returns:
- Returns a list of labels describing this cluster.
-
addLabel
Add a single label to this cluster. -
getDocuments
Returns all documents that belong directly to this cluster. -
addDocument
Add a single document to this cluster. -
getClusters
Returns all child clusters belonging to this cluster. -
addCluster
Adds a child cluster to this cluster. -
getScore
Returns this cluster's score or null, if not available. -
setScore
Sets this cluster's score. -
toString
-
equals
-
hashCode
public int hashCode()
-