org.carrot2.core.clustering
Interface RawCluster

All Known Implementing Classes:
RawClusterBase, RawClusterInterfaceAdapter

public interface RawCluster

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

Classes marked with this interface form clusers of raw documents. The raw interfaces should be gradually refactor to use carrot2-tokenizer component .

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

Version:
$Revision: 2122 $
Author:
Dawid Weiss

Field Summary
static String PROPERTY_JUNK_CLUSTER
          Algorithms may set this property to a non- null value for a cluster to suggest that the cluster contains e.g.
static String PROPERTY_SCORE
          Score of this cluster, if available.
 
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.
 

Field Detail

PROPERTY_SCORE

static final String PROPERTY_SCORE
Score of this cluster, if available. The value of this property must be an instance of Double.

See Also:
Constant Field Values

PROPERTY_JUNK_CLUSTER

static final String PROPERTY_JUNK_CLUSTER
Algorithms may set this property to a non- null value for a cluster to suggest that the cluster contains e.g. unrelated or unassigned documents. Presentation layer can use this information to suppress displaying such clusters and cluster metrics can exclude them from assessment.

See Also:
Constant Field Values
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 String objects representing phrases. The list can be empty, but is never null.

getSubclusters

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

getDocuments

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

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