public static class ByFieldClusteringAlgorithmDescriptor.AttributeBuilder extends Object
ByFieldClusteringAlgorithm component. You can use this
builder as a type-safe alternative to populating the attribute map using attribute keys.| Modifier and Type | Field and Description |
|---|---|
Map<String,Object> |
map
The attribute map populated by this builder.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ByFieldClusteringAlgorithmDescriptor.AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
List<Cluster> |
clusters()
Clusters created by the algorithm.
|
ByFieldClusteringAlgorithmDescriptor.AttributeBuilder |
documents(org.carrot2.util.attribute.IObjectFactory<? extends List<Document>> value)
Documents to cluster.
|
ByFieldClusteringAlgorithmDescriptor.AttributeBuilder |
documents(List<Document> value)
Documents to cluster.
|
ByFieldClusteringAlgorithmDescriptor.AttributeBuilder |
fieldName(org.carrot2.util.attribute.IObjectFactory<? extends String> value)
Name of the field to cluster by.
|
ByFieldClusteringAlgorithmDescriptor.AttributeBuilder |
fieldName(String value)
Name of the field to cluster by.
|
public ByFieldClusteringAlgorithmDescriptor.AttributeBuilder documents(List<Document> value)
ByFieldClusteringAlgorithm.documentspublic ByFieldClusteringAlgorithmDescriptor.AttributeBuilder documents(org.carrot2.util.attribute.IObjectFactory<? extends List<Document>> value)
ByFieldClusteringAlgorithm.documentspublic List<Cluster> clusters()
ByFieldClusteringAlgorithm.clusterspublic ByFieldClusteringAlgorithmDescriptor.AttributeBuilder fieldName(String value)
ByFieldClusteringAlgorithm.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.ByFieldClusteringAlgorithm.fieldNamepublic ByFieldClusteringAlgorithmDescriptor.AttributeBuilder fieldName(org.carrot2.util.attribute.IObjectFactory<? extends String> value)
ByFieldClusteringAlgorithm.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.ByFieldClusteringAlgorithm.fieldName