org.apache.uima.conceptMapper.support.dictionaryResource
Class CompiledDictionaryResource_impl
java.lang.Object
org.apache.uima.conceptMapper.support.dictionaryResource.CompiledDictionaryResource_impl
- All Implemented Interfaces:
- DictionaryResource, org.apache.uima.resource.SharedResourceObject
public class CompiledDictionaryResource_impl
- extends java.lang.Object
- implements DictionaryResource, org.apache.uima.resource.SharedResourceObject
Implementation of a UIMA DictionaryResource
Method Summary |
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 context,
Logger logger,
java.lang.String tokenAnnotationName,
java.lang.String tokenTypeFeatureName,
java.lang.String tokenClassFeatureName,
java.lang.String tokenizerDescriptor)
|
DictionaryResource |
newDictionaryResource(int initialSize)
|
void |
putEntry(java.lang.String key,
java.lang.String[] tokens,
java.lang.String unsortedEntry,
int length,
EntryProperties props)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dictImpl
protected java.util.Hashtable<java.lang.String,DictionaryResource.DictEntriesByLength> dictImpl
- Hashtable of first words. Contains a DictEntries object keyed on word string for the first word
of every entry in the specified dictionary.
entryPropertiesRoot
protected EntryPropertiesRoot entryPropertiesRoot
CompiledDictionaryResource_impl
public CompiledDictionaryResource_impl()
newDictionaryResource
public DictionaryResource newDictionaryResource(int initialSize)
- Specified by:
newDictionaryResource
in interface DictionaryResource
getEntries
public DictionaryResource.DictEntriesByLength getEntries(java.lang.String key)
- Description copied from interface:
DictionaryResource
- return data structure containing a list of dictionary entries, sorted by number of tokens
- Specified by:
getEntries
in interface DictionaryResource
- Returns:
- data structure containing a list of dictionary entries, sorted by number of tokens
isLoaded
public boolean isLoaded()
- Specified by:
isLoaded
in interface DictionaryResource
keys
public java.util.Enumeration<java.lang.String> keys()
- Specified by:
keys
in interface DictionaryResource
load
public void load(org.apache.uima.resource.DataResource data)
throws org.apache.uima.resource.ResourceInitializationException
- Specified by:
load
in interface DictionaryResource
- Specified by:
load
in interface org.apache.uima.resource.SharedResourceObject
- Throws:
org.apache.uima.resource.ResourceInitializationException
loadDictionaryContents
public void loadDictionaryContents(org.apache.uima.analysis_engine.annotator.AnnotatorContext context,
Logger logger,
java.lang.String tokenAnnotationName,
java.lang.String tokenTypeFeatureName,
java.lang.String tokenClassFeatureName,
java.lang.String tokenizerDescriptor)
throws org.apache.uima.resource.ResourceInitializationException
- Specified by:
loadDictionaryContents
in interface DictionaryResource
- Throws:
org.apache.uima.resource.ResourceInitializationException
putEntry
public void putEntry(java.lang.String key,
java.lang.String[] tokens,
java.lang.String unsortedEntry,
int length,
EntryProperties props)
- Specified by:
putEntry
in interface DictionaryResource
- Parameters:
key
- the key to index ontokens
- array of tokens to be entered in the dictionaryunsortedEntry
- String representation of tokens to be entered in the dictionary in sorted order, if
"entry" is sorted, otherwise nulllength
- Number of tokens in entryprops
- the properties object for the dictionary entry
getEntryPropertiesRoot
public EntryPropertiesRoot getEntryPropertiesRoot()
- Specified by:
getEntryPropertiesRoot
in interface DictionaryResource
Copyright © 2011. All Rights Reserved.