public abstract class Dictionary extends Object implements Installable
| Modifier | Constructor and Description |
|---|---|
protected |
Dictionary()
Create a Dictionary that does not do morphological processing.
|
protected |
Dictionary(MorphologicalProcessor morph)
Create a Dictionary using the specified MorphologicalProcessor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Shut down the dictionary
|
abstract Exc |
getException(POS pos,
String derivation)
Lookup
derivation in the exceptions file of part-of-speech
pos and return an Exc object containing the results. |
abstract Iterator |
getExceptionIterator(POS pos)
Return an Iterator over all the Exceptions in the database.
|
abstract IndexWord |
getIndexWord(POS pos,
String lemma)
Look up a word in the database.
|
abstract Iterator |
getIndexWordIterator(POS pos)
Return an Iterator over all the IndexWords of part-of-speech
pos in the database.
|
abstract Iterator |
getIndexWordIterator(POS pos,
String substring)
Return an Iterator over all the IndexWords of part-of-speech pos
whose lemmas contain substring as a substring.
|
static Dictionary |
getInstance() |
MorphologicalProcessor |
getMorphologicalProcessor() |
abstract IndexWord |
getRandomIndexWord(POS pos) |
abstract Synset |
getSynsetAt(POS pos,
long offset)
Return the
Synset at offset offset from the database. |
abstract Iterator |
getSynsetIterator(POS pos)
Return an Iterator over all the Synsets of part-of-speech pos
in the database.
|
IndexWordSet |
lookupAllIndexWords(String lemma)
Return a set of
IndexWords, with each element in the set
corresponding to a part-of-speech of word. |
IndexWord |
lookupIndexWord(POS pos,
String lemma)
Main word lookup procedure.
|
protected static String |
prepareQueryString(String lemma)
Prepares the lemma for being used in a lookup operation.
|
protected static void |
setDictionary(Dictionary dictionary) |
static void |
uninstall() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinstallprotected Dictionary()
protected Dictionary(MorphologicalProcessor morph)
public static Dictionary getInstance()
protected static void setDictionary(Dictionary dictionary)
public static void uninstall()
protected static String prepareQueryString(String lemma)
lemma - the lemma to be preparedpublic abstract Iterator getIndexWordIterator(POS pos) throws JWNLException
pos - The part-of-speechIndexWordsJWNLExceptionpublic abstract Iterator getIndexWordIterator(POS pos, String substring) throws JWNLException
pos - The part-of-speech.IndexWords.JWNLExceptionpublic abstract IndexWord getIndexWord(POS pos, String lemma) throws JWNLException
lookupIndexWord(POS, String).pos - The part-of-speech.lemma - The orthographic representation of the word.null if
no such entry exists.JWNLExceptionpublic abstract IndexWord getRandomIndexWord(POS pos) throws JWNLException
JWNLExceptionpublic abstract Iterator getSynsetIterator(POS pos) throws JWNLException
pos - The part-of-speech.Synsets.JWNLExceptionpublic abstract Synset getSynsetAt(POS pos, long offset) throws JWNLException
Synset at offset offset from the database.pos - The part-of-speech file to look inoffset - The offset of the synset in the fileJWNLExceptionpublic abstract Iterator getExceptionIterator(POS pos) throws JWNLException
pos - the part-of-speechStringsJWNLExceptionpublic abstract Exc getException(POS pos, String derivation) throws JWNLException
derivation in the exceptions file of part-of-speech
pos and return an Exc object containing the results.pos - the exception file to look inderivation - the word to look upJWNLExceptionpublic abstract void close()
public MorphologicalProcessor getMorphologicalProcessor()
public IndexWord lookupIndexWord(POS pos, String lemma) throws JWNLException
pos - the part-of-speech of the word to look uplemma - the lemma to look upJWNLExceptionpublic IndexWordSet lookupAllIndexWords(String lemma) throws JWNLException
IndexWords, with each element in the set
corresponding to a part-of-speech of word.lemma - the word for which to lookup sensesJWNLExceptionCopyright © 2023. All rights reserved.