|
|||||||||||
| 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 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 Summary | |
|---|---|
DictionaryResource_impl()
|
|
DictionaryResource_impl(int initialDictEntries)
|
|
| Method Summary | |
|---|---|
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()
|
| 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 Hashtable<String,DictionaryResource.DictEntriesByLength> dictImpl
protected EntryPropertiesRoot entryPropertiesRoot
protected static final int NumOfInitialDictEntries
dict
public 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
| Constructor Detail |
|---|
public DictionaryResource_impl()
public DictionaryResource_impl(int initialDictEntries)
initialDictEntries - Number of initial dictionary entries| Method Detail |
|---|
public org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryResource_impl.DictLoader getDictLoader()
public DictionaryResource.DictEntriesByLength getEntries(String key)
DictionaryResource
getEntries in interface DictionaryResource
public 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 entry
public 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.ResourceInitializationException
public 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 static String stringTogetherTokens(String[] elements)
public String toString()
toString in interface DictionaryResourcetoString in class Object
public void serializeEntries(FileOutputStream output)
throws IOException
IOExceptionpublic EntryPropertiesRoot getEntryPropertiesRoot()
getEntryPropertiesRoot in interface DictionaryResource
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||