|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl
public class DictionaryResource_impl
Implementation of a UIMA DictionaryResource
Nested Class Summary | |
---|---|
static class |
DictionaryResource_impl.DictEntriesImpl
Private class for storing first words in the dict hashtable. |
static class |
DictionaryResource_impl.DictEntryImpl
|
Nested classes/interfaces inherited from interface org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource |
---|
DictionaryResource.DictEntries, DictionaryResource.DictEntriesByLength, DictionaryResource.DictEntry |
Field Summary | |
---|---|
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 Summary | |
---|---|
DictionaryResource_impl()
|
|
DictionaryResource_impl(int initialDictEntries)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public DictionaryResource_impl()
public DictionaryResource_impl(int initialDictEntries)
initialDictEntries
- Number of initial dictionary entriesMethod Detail |
---|
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |