|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.core.ProcessingComponentBase
org.carrot2.clustering.synthetic.ByFieldClusteringAlgorithm
public class ByFieldClusteringAlgorithm
Clusters documents into a flat structure based on the values of some field of the
documents. By default the Document.SOURCES field is used.
| Field Summary | |
|---|---|
List<Cluster> |
clusters
Clusters created by the algorithm. |
List<Document> |
documents
Documents to cluster. |
String |
fieldName
Name of the field to cluster by. |
| Constructor Summary | |
|---|---|
ByFieldClusteringAlgorithm()
|
|
| Method Summary | |
|---|---|
protected String |
buildClusterLabel(Object fieldValue)
Builds cluster label based on the field value. |
void |
process()
Performs by URL clustering. |
| Methods inherited from class org.carrot2.core.ProcessingComponentBase |
|---|
afterProcessing, beforeProcessing, dispose, getContext, getSharedExecutor, init |
| 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.IProcessingComponent |
|---|
afterProcessing, beforeProcessing, dispose, init |
| Field Detail |
|---|
public List<Document> documents
public List<Cluster> clusters
public String fieldName
buildClusterLabel(Object). If the field value is a collection,
the document will be assigned to all clusters corresponding to the values in the
collection. Note that arrays will not be 'unfolded' in this way.
| Constructor Detail |
|---|
public ByFieldClusteringAlgorithm()
| Method Detail |
|---|
public void process()
throws ProcessingException
process in interface IProcessingComponentprocess in class ProcessingComponentBaseProcessingException - when processing failed. If thrown, the
IProcessingComponent.afterProcessing() method will be called and the component will
be ready to accept further requests or to be disposed of. Finally, the
exception will be rethrown from the controller method that caused the
component to perform processing.protected String buildClusterLabel(Object fieldValue)
fieldValue.toString().
|
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 | ||||||||