org.carrot2.clustering.lingo
Class ClusterBuilderDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.clustering.lingo.ClusterBuilderDescriptor.AttributeBuilder
Enclosing class:
ClusterBuilderDescriptor

public static class ClusterBuilderDescriptor.AttributeBuilder
extends Object

Attribute map builder for the ClusterBuilder component. You can use this builder as a type-safe alternative to populating the attribute map using attribute keys.


Field Summary
 Map<String,Object> map
          The attribute map populated by this builder.
 
Constructor Summary
protected ClusterBuilderDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 ClusterBuilderDescriptor.AttributeBuilder clusterMergingThreshold(double value)
          Cluster merging threshold.
 ClusterBuilderDescriptor.AttributeBuilder labelAssigner(Class<? extends ILabelAssigner> clazz)
          Cluster label assignment method.
 ClusterBuilderDescriptor.AttributeBuilder labelAssigner(ILabelAssigner value)
          Cluster label assignment method.
 ClusterBuilderDescriptor.AttributeBuilder phraseLabelBoost(double value)
          Phrase label boost.
 ClusterBuilderDescriptor.AttributeBuilder phraseLengthPenaltyStart(int value)
          Phrase length penalty start.
 ClusterBuilderDescriptor.AttributeBuilder phraseLengthPenaltyStop(int value)
          Phrase length penalty stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public final Map<String,Object> map
The attribute map populated by this builder.

Constructor Detail

ClusterBuilderDescriptor.AttributeBuilder

protected ClusterBuilderDescriptor.AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.

Method Detail

phraseLabelBoost

public ClusterBuilderDescriptor.AttributeBuilder phraseLabelBoost(double value)
Phrase label boost. The weight of multi-word labels relative to one-word labels. Low values will result in more one-word labels being produced, higher values will favor multi-word labels.

See Also:
ClusterBuilder.phraseLabelBoost

phraseLengthPenaltyStart

public ClusterBuilderDescriptor.AttributeBuilder phraseLengthPenaltyStart(int value)
Phrase length penalty start. The phrase length at which the overlong multi-word labels should start to be penalized. Phrases of length smaller than phraseLengthPenaltyStart will not be penalized.

See Also:
ClusterBuilder.phraseLengthPenaltyStart

phraseLengthPenaltyStop

public ClusterBuilderDescriptor.AttributeBuilder phraseLengthPenaltyStop(int value)
Phrase length penalty stop. The phrase length at which the overlong multi-word labels should be removed completely. Phrases of length larger than phraseLengthPenaltyStop will be removed.

See Also:
ClusterBuilder.phraseLengthPenaltyStop

clusterMergingThreshold

public ClusterBuilderDescriptor.AttributeBuilder clusterMergingThreshold(double value)
Cluster merging threshold. The percentage overlap between two cluster's documents required for the clusters to be merged into one clusters. Low values will result in more aggressive merging, which may lead to irrelevant documents in clusters. High values will result in fewer clusters being merged, which may lead to very similar or duplicated clusters.

See Also:
ClusterBuilder.clusterMergingThreshold

labelAssigner

public ClusterBuilderDescriptor.AttributeBuilder labelAssigner(ILabelAssigner value)
Cluster label assignment method.

See Also:
ClusterBuilder.labelAssigner

labelAssigner

public ClusterBuilderDescriptor.AttributeBuilder labelAssigner(Class<? extends ILabelAssigner> clazz)
Cluster label assignment method.

See Also:
ClusterBuilder.labelAssigner


Copyright (c) Dawid Weiss, Stanislaw Osinski