|
Carrot2 Framework
API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.util.PropertyProviderBase
org.carrot2.core.clustering.RawClusterBase
public class RawClusterBase
A complete base implementation of the RawClusterinterface.
| Field Summary |
|---|
| Fields inherited from interface org.carrot2.core.clustering.RawCluster |
|---|
PROPERTY_JUNK_CLUSTER, PROPERTY_SCORE |
| Constructor Summary | |
|---|---|
RawClusterBase()
Creates a new cluster with no labels, no documents, no subclusters and no properties; |
|
| Method Summary | |
|---|---|
void |
addDocument(RawDocument rawDocument)
Adds a document to this cluster. |
void |
addDocuments(Collection documents)
Adds a collection of documents to this cluster in the order returned by the collection's iterator. |
void |
addLabel(String label)
Adds a label to this cluster. |
void |
addSubcluster(RawCluster rawCluster)
Adds a subcluster to this cluster. |
void |
addSubclusters(Collection subclusters)
Adds a collection of subclusters to this cluster. |
List |
getClusterDescription()
Returns phrases denoting this cluster's description. |
List |
getDocuments()
|
String |
getFullInfo()
Returns a multiline String representing this cluster's content, including the contents of this cluster's documents. |
Map |
getProperties()
Returns all properties of this cluster. |
double |
getScore()
A convenience method returning this cluster's score or -1 if the score has not been set. |
List |
getSubclusters()
|
void |
setScore(double score)
A convenience method setting score for this cluster. |
| Methods inherited from class org.carrot2.util.PropertyProviderBase |
|---|
clonePropertiesFrom, getDoubleProperty, getIntProperty, getProperty, getPropertyHelper, setDoubleProperty, setIntProperty, setProperties, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.carrot2.core.clustering.RawCluster |
|---|
getProperty, setProperty |
| Constructor Detail |
|---|
public RawClusterBase()
| Method Detail |
|---|
public Map getProperties()
getProperties in class PropertyProviderBasepublic double getScore()
public void setScore(double score)
score - score to be setpublic void addDocument(RawDocument rawDocument)
rawDocument - the document to be added.public void addDocuments(Collection documents)
documents - public void addLabel(String label)
label - the label to be added.public void addSubcluster(RawCluster rawCluster)
rawCluster - the subcluster to be added.public void addSubclusters(Collection subclusters)
subclusters - to be addedpublic String getFullInfo()
public List getClusterDescription()
RawCluster
getClusterDescription in interface RawClusterString objects representing phrases. The
list can be empty, but is never null.public List getSubclusters()
getSubclusters in interface RawClusterRawCluster.public List getDocuments()
getDocuments in interface RawClusterRawDocument.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||