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
All Methods Instance Methods Concrete Methods 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.boolean
equals(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()
Double
getScore()
Returns this cluster's score or null, if not available.int
hashCode()
Cluster<T>
setScore(Double score)
Sets this cluster's score.String
toString()
-
-
-
Method Detail
-
getLabels
public List<String> getLabels()
- Returns:
- Returns a list of labels describing this cluster.
-
getDocuments
public List<T> getDocuments()
Returns all documents that belong directly to this cluster.
-
getClusters
public List<Cluster<T>> getClusters()
Returns all child clusters belonging to this cluster.
-
getScore
public Double getScore()
Returns this cluster's score or null, if not available.
-
-