public class DictionaryResource_impl extends 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 Hashtable<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 String |
PARAM_ATTRIBUTE_LIST
Configuration parameter key/label for the attribute list
|
static String |
PARAM_CASE_MATCH
Configuration parameter key/label for the case matching string
|
static String |
PARAM_DUMPDICT
Configuration parameter key/label to indicate whether dictionary should be printed upon load
|
static String |
PARAM_ORDERINDEPENDENTLOOKUP
Configuration parameter key/label for the order independent lookup indicator
|
static String |
PARAM_STEMMER_CLASS
Configuration parameter key/label for the stemmer class spec.
|
static String |
PARAM_STEMMER_DICT
Configuration parameter key/label for the stemmer dictionary, passed into the stemmer's
initialization method
|
static String |
PARAM_XML_PARSER |
| Constructor and Description |
|---|
DictionaryResource_impl() |
DictionaryResource_impl(int initialDictEntries) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
convertEntities(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(String key)
return data structure containing a list of dictionary entries, sorted by number of tokens
|
EntryPropertiesRoot |
getEntryPropertiesRoot() |
boolean |
isLoaded() |
Enumeration<String> |
keys() |
void |
load(org.apache.uima.resource.DataResource data) |
void |
loadDictionaryContents(org.apache.uima.analysis_engine.annotator.AnnotatorContext aContext,
Logger logger,
String tokenAnnotationName,
String tokenTypeFeatureName,
String tokenClassFeatureName,
String tokenizerDescriptor) |
DictionaryResource |
newDictionaryResource(int initialDictEntries) |
void |
putEntry(String key,
String[] elements,
String unsorted,
int length,
EntryProperties props)
Create a new dictionary entry.
|
void |
serializeEntries(FileOutputStream output) |
void |
setLoaded(boolean loaded) |
static String |
stringTogetherTokens(String[] elements) |
String |
toString() |
protected org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl.DictLoader dictLoader
protected Hashtable<String,DictionaryResource.DictEntriesByLength> dictImpl
protected EntryPropertiesRoot entryPropertiesRoot
protected static final int NumOfInitialDictEntries
dictpublic static final String PARAM_ORDERINDEPENDENTLOOKUP
public static final String PARAM_DUMPDICT
public static final String PARAM_CASE_MATCH
public static final String PARAM_STEMMER_CLASS
public static final String PARAM_STEMMER_DICT
public static final String PARAM_ATTRIBUTE_LIST
public static final 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(String key)
DictionaryResourcegetEntries in interface DictionaryResourcepublic void putEntry(String key, String[] elements, String unsorted, int length, EntryProperties props)
putEntry in interface DictionaryResourcekey - 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 DictionaryResourceload in interface org.apache.uima.resource.SharedResourceObjectorg.apache.uima.resource.ResourceInitializationExceptionpublic void loadDictionaryContents(org.apache.uima.analysis_engine.annotator.AnnotatorContext aContext,
Logger logger,
String tokenAnnotationName,
String tokenTypeFeatureName,
String tokenClassFeatureName,
String tokenizerDescriptor)
throws org.apache.uima.resource.ResourceInitializationException
loadDictionaryContents in interface DictionaryResourceorg.apache.uima.resource.ResourceInitializationExceptionpublic boolean isLoaded()
isLoaded in interface DictionaryResourcepublic void setLoaded(boolean loaded)
loaded - The loaded to set.protected String convertEntities(String input)
input - the string to process.public DictionaryResource newDictionaryResource(int initialDictEntries)
newDictionaryResource in interface DictionaryResourcepublic Enumeration<String> keys()
keys in interface DictionaryResourcepublic String toString()
toString in interface DictionaryResourcetoString in class Objectpublic void serializeEntries(FileOutputStream output) throws IOException
IOExceptionpublic EntryPropertiesRoot getEntryPropertiesRoot()
getEntryPropertiesRoot in interface DictionaryResourceCopyright © 2015. All rights reserved.