org.carrot2.text.preprocessing.filter
Class StopLabelFilterDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.text.preprocessing.filter.StopLabelFilterDescriptor.AttributeBuilder
Enclosing class:
StopLabelFilterDescriptor

public static class StopLabelFilterDescriptor.AttributeBuilder
extends Object

Attribute map builder for the StopLabelFilter 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 StopLabelFilterDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 StopLabelFilterDescriptor.AttributeBuilder enabled(boolean value)
          Remove stop labels.
 LabelFormatterDescriptor.AttributeBuilder labelFormatter()
          Returns an attribute builder for the nested LabelFormatter component, backed by the same attribute map as the current builder.
 
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

StopLabelFilterDescriptor.AttributeBuilder

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

Method Detail

enabled

public StopLabelFilterDescriptor.AttributeBuilder enabled(boolean value)
Remove stop labels. Removes labels that are declared as stop labels in the stoplabels.<lang> files. Please note that adding a long list of regular expressions to the stoplabels file may result in a noticeable performance penalty.

See Also:
StopLabelFilter.enabled

labelFormatter

public LabelFormatterDescriptor.AttributeBuilder labelFormatter()
Returns an attribute builder for the nested LabelFormatter component, backed by the same attribute map as the current builder.



Copyright (c) Dawid Weiss, Stanislaw Osinski