|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.didion.jwnl.dictionary.Dictionary
net.didion.jwnl.dictionary.MapBackedDictionary
A Dictionary backed by Maps. Warning: this has huge memory requirements.
Make sure to start the interpreter with a large enough free memory pool to accomodate this.
| Field Summary | |
static java.lang.String |
FILE_TYPE
File type install parameter. |
static java.lang.String |
MORPH
MorphologicalProcessor class install parameter. |
static java.lang.String |
PATH
The path of the dictionary files |
| Constructor Summary | |
MapBackedDictionary()
|
|
| Method Summary | |
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)
|
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. |
void |
install(java.util.Map params)
Install a MapBackedDictionary from a map of parameters. |
static void |
install(java.lang.String searchDir,
java.lang.Class dictionaryFileType)
|
static void |
install(java.lang.String searchDir,
java.lang.Class dictionaryFileType,
MorphologicalProcessor morph)
|
| Methods inherited from class net.didion.jwnl.dictionary.Dictionary |
getInstance, getMorphologicalProcessor, lookupAllIndexWords, lookupIndexWord, prepareQueryString, setDictionary, uninstall |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public 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 FILE_TYPE
DictionaryFileType.
public static final java.lang.String PATH
| Constructor Detail |
public MapBackedDictionary()
| Method Detail |
public static void install(java.lang.String searchDir,
java.lang.Class dictionaryFileType)
throws JWNLException
JWNLException
public static void install(java.lang.String searchDir,
java.lang.Class dictionaryFileType,
MorphologicalProcessor morph)
throws JWNLException
JWNLException
public void install(java.util.Map params)
throws JWNLException
MapBackedDictionary from a map of parameters. The parameters are chosen from the static
variables above.
JWNLException
public IndexWord getIndexWord(POS pos,
java.lang.String lemma)
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.
public java.util.Iterator getIndexWordIterator(POS pos,
java.lang.String substring)
Dictionary
getIndexWordIterator in class Dictionarypos - The part-of-speech.
IndexWords.public java.util.Iterator getIndexWordIterator(POS pos)
Dictionary
getIndexWordIterator in class Dictionarypos - The part-of-speech
IndexWords
public IndexWord getRandomIndexWord(POS pos)
throws JWNLException
getRandomIndexWord in class DictionaryJWNLExceptionpublic java.util.Iterator getSynsetIterator(POS pos)
Dictionary
getSynsetIterator in class Dictionarypos - The part-of-speech.
Synsets.public java.util.Iterator getExceptionIterator(POS pos)
Dictionary
getExceptionIterator in class Dictionarypos - the part-of-speech
Strings
public Synset getSynsetAt(POS pos,
long offset)
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 file
public Exc getException(POS pos,
java.lang.String derivation)
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 up
public void close()
Dictionary
close in class Dictionary
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||