org.carrot2.core.clustering
Interface Cluster


public interface Cluster

A cluster object holds a list of TokenizedDocument references and possibly a list of sub-clusters.

Classes marked with this interface form clusers of tokenized documents. See carrot2-tokenizer component for details.

A cluster may have additional name-value properties available via getProperty(String) method.

Version:
$Revision: 2122 $
Author:
Dawid Weiss

Method Summary
 List getClusterDescription()
          Returns phrases denoting this cluster's description.
 List getDocuments()
           
 Object getProperty(String propertyName)
          Returns a named property of this cluster.
 List getSubclusters()
           
 Object setProperty(String propertyName, Object value)
          Sets a value for a named property in this cluster.
 

Method Detail

getClusterDescription

List getClusterDescription()
Returns phrases denoting this cluster's description. The order of phrases reflects their relevance to being a good cluster description - if there is a limit of phrases an application can display, phrases from the end of the list should be omitted.

Returns:
A list of description phrases, each of type TokenSequence.

getSubclusters

List getSubclusters()
Returns:
Returns a list of sub-clusters, each of type Cluster.

getDocuments

List getDocuments()
Returns:
Returns a list of documents in this cluster, each of type TokenizedDocument.

getProperty

Object getProperty(String propertyName)
Returns a named property of this cluster.

Parameters:
propertyName - Name of the property to retrieve.
Returns:
The value of the property or null if this property is not available for this cluster.

setProperty

Object setProperty(String propertyName,
                   Object value)
Sets a value for a named property in this cluster.

Parameters:
propertyName - Name of the property to set.
value - The new value of the property.
Returns:
Previous value of the property if it existed, or null.


Copyright (c) Dawid Weiss, Stanislaw Osinski