public class DatabaseBackedDictionary extends AbstractCachingDictionary
| Modifier and Type | Class and Description |
|---|---|
private class |
DatabaseBackedDictionary.DatabaseElementIterator |
private class |
DatabaseBackedDictionary.ExceptionIterator |
private class |
DatabaseBackedDictionary.IndexWordIterator |
private class |
DatabaseBackedDictionary.SynsetIterator |
| Modifier and Type | Field and Description |
|---|---|
private DatabaseManager |
_dbManager |
private DatabaseDictionaryElementFactory |
_elementFactory |
static java.lang.String |
DATABASE_MANAGER |
static java.lang.String |
DICTIONARY_ELEMENT_FACTORY |
static java.lang.String |
MORPH
MorphologicalProcessor class install parameter. |
| Modifier | Constructor and Description |
|---|---|
|
DatabaseBackedDictionary() |
private |
DatabaseBackedDictionary(MorphologicalProcessor morph,
DatabaseDictionaryElementFactory elementFactory,
DatabaseManager dbManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shut down the dictionary
|
Exc |
getException(POS pos,
java.lang.String derivation)
Lookup
derivation in the exceptions file of part-of-speech
pos and return an Exc object containing the results. |
java.util.Iterator |
getExceptionIterator(POS pos)
Return an Iterator over all the Exceptions in the database.
|
IndexWord |
getIndexWord(POS pos,
java.lang.String lemma)
Look up a word in the database.
|
java.util.Iterator |
getIndexWordIterator(POS pos)
Return an Iterator over all the IndexWords of part-of-speech
pos in the database.
|
java.util.Iterator |
getIndexWordIterator(POS pos,
java.lang.String substring)
Return an Iterator over all the IndexWords of part-of-speech pos
whose lemmas contain substring as a substring.
|
IndexWord |
getRandomIndexWord(POS pos) |
java.lang.String |
getSenseKey(long offset,
java.lang.String lemma)
Not implemented in DB yet.
|
Synset |
getSynsetAt(POS pos,
long offset)
Return the
Synset at offset offset from the database. |
java.util.Iterator |
getSynsetIterator(POS pos)
Return an Iterator over all the Synsets of part-of-speech pos
in the database.
|
int |
getUsageCount(long offset,
java.lang.String lemma)
Not implemented in DB yet.
|
void |
install(java.util.Map params) |
cacheException, cacheIndexWord, cacheSynset, clearCache, clearCache, getCacheCapacity, getCachedException, getCachedIndexWord, getCachedSynset, getCacheSizes, isCachingEnabled, setCacheCapacity, setCacheCapacity, setCachingEnabledgetInstance, getMorphologicalProcessor, lookupAllIndexWords, lookupIndexWord, prepareQueryString, setDictionary, uninstallpublic static final java.lang.String MORPH
MorphologicalProcessor class install parameter. The value should be the
class of MorphologicalProcessor to use.public static final java.lang.String DICTIONARY_ELEMENT_FACTORY
public static final java.lang.String DATABASE_MANAGER
private DatabaseDictionaryElementFactory _elementFactory
private DatabaseManager _dbManager
public DatabaseBackedDictionary()
private DatabaseBackedDictionary(MorphologicalProcessor morph, DatabaseDictionaryElementFactory elementFactory, DatabaseManager dbManager)
public void install(java.util.Map params)
throws JWNLException
JWNLExceptionpublic IndexWord getIndexWord(POS pos, java.lang.String lemma) throws JWNLException
DictionaryDictionary.lookupIndexWord(POS, String).getIndexWord in class Dictionarypos - The part-of-speech.lemma - The orthographic representation of the word.null if
no such entry exists.JWNLExceptionpublic java.util.Iterator getIndexWordIterator(POS pos) throws JWNLException
DictionarygetIndexWordIterator in class Dictionarypos - The part-of-speechIndexWordsJWNLExceptionpublic java.util.Iterator getIndexWordIterator(POS pos, java.lang.String substring) throws JWNLException
DictionarygetIndexWordIterator in class Dictionarypos - The part-of-speech.IndexWords.JWNLExceptionpublic IndexWord getRandomIndexWord(POS pos) throws JWNLException
getRandomIndexWord in class DictionaryJWNLExceptionpublic Synset getSynsetAt(POS pos, long offset) throws JWNLException
DictionarySynset at offset offset from the database.getSynsetAt in class Dictionarypos - The part-of-speech file to look inoffset - The offset of the synset in the fileJWNLExceptionpublic java.util.Iterator getSynsetIterator(POS pos) throws JWNLException
DictionarygetSynsetIterator in class Dictionarypos - The part-of-speech.Synsets.JWNLExceptionpublic Exc getException(POS pos, java.lang.String derivation) throws JWNLException
Dictionaryderivation in the exceptions file of part-of-speech
pos and return an Exc object containing the results.getException in class Dictionarypos - the exception file to look inderivation - the word to look upJWNLExceptionpublic java.util.Iterator getExceptionIterator(POS pos) throws JWNLException
DictionarygetExceptionIterator in class Dictionarypos - the part-of-speechStringsJWNLExceptionpublic void close()
Dictionaryclose in class Dictionarypublic int getUsageCount(long offset,
java.lang.String lemma)
public java.lang.String getSenseKey(long offset,
java.lang.String lemma)