public class DictionaryResource_impl extends java.lang.Object implements DictionaryResource, org.apache.uima.resource.SharedResourceObject
Modifier and Type | Class and Description |
---|---|
static class |
DictionaryResource_impl.DictEntriesImpl
Private class for storing first words in the dict hashtable.
|
static class |
DictionaryResource_impl.DictEntryImpl |
DictionaryResource.DictEntries, DictionaryResource.DictEntriesByLength, DictionaryResource.DictEntry
Modifier and Type | Field and Description |
---|---|
protected java.util.Hashtable<java.lang.String,DictionaryResource.DictEntriesByLength> |
dictImpl
Hashtable of first words.
|
protected org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl.DictLoader |
dictLoader
Dictionary file loader.
|
int |
entryNum |
protected EntryPropertiesRoot |
entryPropertiesRoot |
protected static int |
NumOfInitialDictEntries
Initial size of
dict |
static java.lang.String |
PARAM_ATTRIBUTE_LIST
Configuration parameter key/label for the attribute list
|
static java.lang.String |
PARAM_CASE_MATCH
Configuration parameter key/label for the case matching string
|
static java.lang.String |
PARAM_DUMPDICT
Configuration parameter key/label to indicate whether dictionary should be printed upon load
|
static java.lang.String |
PARAM_ORDERINDEPENDENTLOOKUP
Configuration parameter key/label for the order independent lookup indicator
|
static java.lang.String |
PARAM_STEMMER_CLASS
Configuration parameter key/label for the stemmer class spec.
|
static java.lang.String |
PARAM_STEMMER_DICT
Configuration parameter key/label for the stemmer dictionary, passed into the stemmer's
initialization method
|
static java.lang.String |
PARAM_XML_PARSER |
Constructor and Description |
---|
DictionaryResource_impl() |
DictionaryResource_impl(int initialDictEntries) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
convertEntities(java.lang.String input)
Convert character entities in a string to the corresponding character.
|
org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl.DictLoader |
getDictLoader() |
DictionaryResource.DictEntriesByLength |
getEntries(java.lang.String key)
return data structure containing a list of dictionary entries, sorted by number of tokens
|
EntryPropertiesRoot |
getEntryPropertiesRoot() |
boolean |
isLoaded() |
java.util.Enumeration<java.lang.String> |
keys() |
void |
load(org.apache.uima.resource.DataResource data) |
void |
loadDictionaryContents(org.apache.uima.analysis_engine.annotator.AnnotatorContext aContext,
Logger logger,
java.lang.String tokenAnnotationName,
java.lang.String tokenTypeFeatureName,
java.lang.String tokenClassFeatureName,
java.lang.String tokenizerDescriptor) |
DictionaryResource |
newDictionaryResource(int initialDictEntries) |
void |
putEntry(java.lang.String key,
java.lang.String[] elements,
java.lang.String unsorted,
int length,
EntryProperties props)
Create a new dictionary entry.
|
void |
serializeEntries(java.io.FileOutputStream output) |
void |
setLoaded(boolean loaded) |
static java.lang.String |
stringTogetherTokens(java.lang.String[] elements) |
java.lang.String |
toString() |
protected org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl.DictLoader dictLoader
protected java.util.Hashtable<java.lang.String,DictionaryResource.DictEntriesByLength> dictImpl
protected EntryPropertiesRoot entryPropertiesRoot
protected static final int NumOfInitialDictEntries
dict
public static final java.lang.String PARAM_ORDERINDEPENDENTLOOKUP
public static final java.lang.String PARAM_DUMPDICT
public static final java.lang.String PARAM_CASE_MATCH
public static final java.lang.String PARAM_STEMMER_CLASS
public static final java.lang.String PARAM_STEMMER_DICT
public static final java.lang.String PARAM_ATTRIBUTE_LIST
public static final java.lang.String PARAM_XML_PARSER
public int entryNum
public DictionaryResource_impl()
public DictionaryResource_impl(int initialDictEntries)
initialDictEntries
- Number of initial dictionary entriespublic org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl.DictLoader getDictLoader()
public DictionaryResource.DictEntriesByLength getEntries(java.lang.String key)
DictionaryResource
getEntries
in interface DictionaryResource
public void putEntry(java.lang.String key, java.lang.String[] elements, java.lang.String unsorted, int length, EntryProperties props)
putEntry
in interface DictionaryResource
key
- the key to index onelements
- the individual elements to be entered in the dictionaryunsorted
- an unsorted string representation of the entry, if the contents of 'elements' has been sortedlength
- the number of words in the phrase (>=1)props
- the EntryProperties object for the dictionary entrypublic void load(org.apache.uima.resource.DataResource data) throws org.apache.uima.resource.ResourceInitializationException
load
in interface DictionaryResource
load
in interface org.apache.uima.resource.SharedResourceObject
org.apache.uima.resource.ResourceInitializationException
public void loadDictionaryContents(org.apache.uima.analysis_engine.annotator.AnnotatorContext aContext, Logger logger, java.lang.String tokenAnnotationName, java.lang.String tokenTypeFeatureName, java.lang.String tokenClassFeatureName, java.lang.String tokenizerDescriptor) throws org.apache.uima.resource.ResourceInitializationException
loadDictionaryContents
in interface DictionaryResource
org.apache.uima.resource.ResourceInitializationException
public boolean isLoaded()
isLoaded
in interface DictionaryResource
public void setLoaded(boolean loaded)
loaded
- The loaded to set.protected java.lang.String convertEntities(java.lang.String input)
input
- the string to process.public DictionaryResource newDictionaryResource(int initialDictEntries)
newDictionaryResource
in interface DictionaryResource
public java.util.Enumeration<java.lang.String> keys()
keys
in interface DictionaryResource
public static java.lang.String stringTogetherTokens(java.lang.String[] elements)
public java.lang.String toString()
toString
in interface DictionaryResource
toString
in class java.lang.Object
public void serializeEntries(java.io.FileOutputStream output) throws java.io.IOException
java.io.IOException
public EntryPropertiesRoot getEntryPropertiesRoot()
getEntryPropertiesRoot
in interface DictionaryResource
Copyright © 2013. All Rights Reserved.