org.apache.uima.annotator.dict_annot.dictionary.impl
Class HashMapDictionaryBuilder

java.lang.Object
  extended by org.apache.uima.annotator.dict_annot.dictionary.impl.HashMapDictionaryBuilder
All Implemented Interfaces:
DictionaryBuilder

public class HashMapDictionaryBuilder
extends java.lang.Object
implements DictionaryBuilder

Implementation of the DictionaryBuilder interface to build a new HashMap dictionary.


Constructor Summary
HashMapDictionaryBuilder()
          Default constructor.
 
Method Summary
 void addWord(java.lang.String word)
          Adds a new word to the dictionary.
 Dictionary getDictionary()
           
 java.lang.String getMultiWordSeparator()
          Returns the multi-word separator of the dictionary builder
 void setDictionaryProperties(java.lang.String language, java.lang.String typeName, boolean caseNormalization, boolean multiWordEntries, java.lang.String multiWordSeparator)
          Set the dictionary properties, this method have to be called before words can be added to the dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMapDictionaryBuilder

public HashMapDictionaryBuilder()
Default constructor. Creates a new HashMap dictionary with case normalization.

Method Detail

getMultiWordSeparator

public java.lang.String getMultiWordSeparator()
Returns the multi-word separator of the dictionary builder

Returns:
multi-word separator

setDictionaryProperties

public void setDictionaryProperties(java.lang.String language,
                                    java.lang.String typeName,
                                    boolean caseNormalization,
                                    boolean multiWordEntries,
                                    java.lang.String multiWordSeparator)
Description copied from interface: DictionaryBuilder
Set the dictionary properties, this method have to be called before words can be added to the dictionary.

Specified by:
setDictionaryProperties in interface DictionaryBuilder
Parameters:
language - dictionary language
typeName - type name for the dictionary content
caseNormalization - case normalization settings
multiWordEntries - multi-word entries setting
multiWordSeparator - multi-word entry separator

addWord

public void addWord(java.lang.String word)
Description copied from interface: DictionaryBuilder
Adds a new word to the dictionary.

Specified by:
addWord in interface DictionaryBuilder
Parameters:
word - word that should be added.

getDictionary

public Dictionary getDictionary()
Specified by:
getDictionary in interface DictionaryBuilder
Returns:
returns the Dictionary object if the dictionary could be created.


Copyright © 2011. All Rights Reserved.