org.carrot2.text.linguistic
Class DefaultLexicalDataFactoryDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.text.linguistic.DefaultLexicalDataFactoryDescriptor.AttributeBuilder
Enclosing class:
DefaultLexicalDataFactoryDescriptor

public static class DefaultLexicalDataFactoryDescriptor.AttributeBuilder
extends Object

Attribute map builder for the DefaultLexicalDataFactory 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 DefaultLexicalDataFactoryDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 DefaultLexicalDataFactoryDescriptor.AttributeBuilder mergeResources(boolean value)
          Merges stop words and stop labels from all known languages.
 DefaultLexicalDataFactoryDescriptor.AttributeBuilder reloadResources(boolean value)
           
 DefaultLexicalDataFactoryDescriptor.AttributeBuilder resourceLookup(Class<? extends ResourceLookup> clazz)
           
 DefaultLexicalDataFactoryDescriptor.AttributeBuilder resourceLookup(ResourceLookup value)
           
 
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

DefaultLexicalDataFactoryDescriptor.AttributeBuilder

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

Method Detail

reloadResources

public DefaultLexicalDataFactoryDescriptor.AttributeBuilder reloadResources(boolean value)
See Also:
DefaultLexicalDataFactory.reloadResources

mergeResources

public DefaultLexicalDataFactoryDescriptor.AttributeBuilder mergeResources(boolean value)
Merges stop words and stop labels from all known languages. If set to false, only stop words and stop labels of the active language will be used. If set to true, stop words from all LanguageCodes will be used together and stop labels from all languages will be used together, no matter the active language. Lexical resource merging is useful when clustering data in a mix of different languages and should increase clustering quality in such settings.

See Also:
DefaultLexicalDataFactory.mergeResources

resourceLookup

public DefaultLexicalDataFactoryDescriptor.AttributeBuilder resourceLookup(ResourceLookup value)
See Also:
DefaultLexicalDataFactory.resourceLookup

resourceLookup

public DefaultLexicalDataFactoryDescriptor.AttributeBuilder resourceLookup(Class<? extends ResourceLookup> clazz)
See Also:
DefaultLexicalDataFactory.resourceLookup


Copyright (c) Dawid Weiss, Stanislaw Osinski