public class DatabaseBackedDictionary extends AbstractCachingDictionary
Dictionary.Version
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATABASE_MANAGER
Database manager install parameter.
|
isCachingEnabled
CHECK_LEX_IDS_KEY, DEFAULT_RESOURCE_CONFIG_PATH, DICTIONARY_ELEMENT_FACTORY, EDIT_CHECK_ALIEN_POINTERS, EDIT_MANAGE_SYMMETRIC_POINTERS, elementFactory, MORPHOLOGICAL_PROCESSOR, params
Constructor and Description |
---|
DatabaseBackedDictionary(org.w3c.dom.Document doc) |
Modifier and Type | Method and Description |
---|---|
void |
cacheAll() |
void |
close()
Shuts down the dictionary, freeing resources.
|
void |
edit()
Puts the dictionary into edit mode.
|
Exc |
getException(POS pos,
java.lang.String derivation)
Looks up derivation in the exceptions file of part-of-speech
pos and return an Exc object containing the results.
|
java.util.Iterator<Exc> |
getExceptionIterator(POS pos)
Returns an iterator over all the exceptions.
|
IndexWord |
getIndexWord(POS pos,
java.lang.String lemma)
Looks up a word.
|
java.util.Iterator<IndexWord> |
getIndexWordIterator(POS pos)
Returns an Iterator over all the IndexWords of part-of-speech pos.
|
java.util.Iterator<IndexWord> |
getIndexWordIterator(POS pos,
java.lang.String substring)
Returns an Iterator over all the IndexWords of part-of-speech pos
whose lemmas contain substring as a substring.
|
IndexWord |
getRandomIndexWord(POS pos)
Returns a random index word of a specified pos.
|
Synset |
getSynsetAt(POS pos,
long offset)
Returns the
Synset at offset offset. |
java.util.Iterator<Synset> |
getSynsetIterator(POS pos)
Returns an iterator over all the synsets of part-of-speech pos.
|
addException, addIndexWord, addSynset, cacheException, cacheIndexWord, cachePOS, cacheSynset, clearCache, clearCache, clearException, clearIndexWord, clearSynset, getCacheCapacity, getCachedException, getCachedIndexWord, getCachedSynset, getCacheSizes, isCachingEnabled, removeException, removeIndexWord, removeSynset, setCacheCapacity, setCacheCapacity, setCachingEnabled
addElement, checkEditable, createException, createIndexWord, createSynset, delete, getCheckAlienPointers, getDatabaseBackedInstance, getDefaultResourceInstance, getFileBackedInstance, getFrames, getFrames, getInstance, getInstance, getManageSymmetricPointers, getMapBackedInstance, getMessages, getMorphologicalProcessor, getRandom, getResourceInstance, getRestoreDictionary, getVerbFrameIndices, getVersion, getWordBySenseKey, isEditable, lookupAllIndexWords, lookupIndexWord, prepareQueryString, removeElement, resolveAllPointers, resolvePointers, save, setRandom, setRestoreDictionary
public static final java.lang.String DATABASE_MANAGER
public DatabaseBackedDictionary(org.w3c.dom.Document doc) throws JWNLException
JWNLException
public IndexWord getIndexWord(POS pos, java.lang.String lemma) throws JWNLException
Dictionary
Dictionary.lookupIndexWord(POS, String)
.getIndexWord
in class Dictionary
pos
- The part-of-speechlemma
- The orthographic representation of the wordnull
if
no such entry existsJWNLException
- JWNLExceptionpublic java.util.Iterator<IndexWord> getIndexWordIterator(POS pos) throws JWNLException
Dictionary
getIndexWordIterator
in class AbstractCachingDictionary
pos
- The part-of-speechIndexWord
sJWNLException
- JWNLExceptionpublic java.util.Iterator<IndexWord> getIndexWordIterator(POS pos, java.lang.String substring) throws JWNLException
Dictionary
getIndexWordIterator
in class AbstractCachingDictionary
pos
- The part-of-speech.substring
- substringIndexWord
s.JWNLException
- JWNLExceptionpublic IndexWord getRandomIndexWord(POS pos) throws JWNLException
Dictionary
getRandomIndexWord
in class Dictionary
pos
- part of speechJWNLException
- JWNLExceptionpublic Synset getSynsetAt(POS pos, long offset) throws JWNLException
Dictionary
Synset
at offset offset.getSynsetAt
in class Dictionary
pos
- The part-of-speech file to look inoffset
- The offset of the synset in the fileJWNLException
- JWNLExceptionpublic java.util.Iterator<Synset> getSynsetIterator(POS pos) throws JWNLException
Dictionary
getSynsetIterator
in class AbstractCachingDictionary
pos
- The part-of-speech.Synset
s.JWNLException
- JWNLExceptionpublic Exc getException(POS pos, java.lang.String derivation) throws JWNLException
Dictionary
getException
in class Dictionary
pos
- the exception file to look inderivation
- the word to look upJWNLException
- JWNLExceptionpublic java.util.Iterator<Exc> getExceptionIterator(POS pos) throws JWNLException
Dictionary
getExceptionIterator
in class AbstractCachingDictionary
pos
- the part-of-speechExc
sJWNLException
- JWNLExceptionpublic void close()
Dictionary
close
in class Dictionary
public void cacheAll() throws JWNLException
cacheAll
in class AbstractCachingDictionary
JWNLException
public void edit() throws JWNLException
Dictionary
edit
in class AbstractCachingDictionary
JWNLException
- JWNLException