public class CompiledDictionaryResource_impl extends Object implements DictionaryResource, org.apache.uima.resource.SharedResourceObject
DictionaryResource.DictEntries, DictionaryResource.DictEntriesByLength, DictionaryResource.DictEntry
Modifier and Type | Field and Description |
---|---|
protected Hashtable<String,DictionaryResource.DictEntriesByLength> |
dictImpl
Hashtable of first words.
|
protected EntryPropertiesRoot |
entryPropertiesRoot |
Constructor and Description |
---|
CompiledDictionaryResource_impl() |
Modifier and Type | Method and Description |
---|---|
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 context,
Logger logger,
String tokenAnnotationName,
String tokenTypeFeatureName,
String tokenClassFeatureName,
String tokenizerDescriptor) |
DictionaryResource |
newDictionaryResource(int initialSize) |
void |
putEntry(String key,
String[] tokens,
String unsortedEntry,
int length,
EntryProperties props) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
protected Hashtable<String,DictionaryResource.DictEntriesByLength> dictImpl
protected EntryPropertiesRoot entryPropertiesRoot
public DictionaryResource newDictionaryResource(int initialSize)
newDictionaryResource
in interface DictionaryResource
public DictionaryResource.DictEntriesByLength getEntries(String key)
DictionaryResource
getEntries
in interface DictionaryResource
public boolean isLoaded()
isLoaded
in interface DictionaryResource
public Enumeration<String> keys()
keys
in interface DictionaryResource
public 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 context, Logger logger, String tokenAnnotationName, String tokenTypeFeatureName, String tokenClassFeatureName, String tokenizerDescriptor) throws org.apache.uima.resource.ResourceInitializationException
loadDictionaryContents
in interface DictionaryResource
org.apache.uima.resource.ResourceInitializationException
public void putEntry(String key, String[] tokens, String unsortedEntry, int length, EntryProperties props)
putEntry
in interface DictionaryResource
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 entrypublic EntryPropertiesRoot getEntryPropertiesRoot()
getEntryPropertiesRoot
in interface DictionaryResource
Copyright © 2006–2024 The Apache Software Foundation. All rights reserved.