public interface IDictionary extends IHasVersion, IHasLifecycle, IHasCharset
open() before it is used, otherwise its methods throw an
IllegalStateException.IHasLifecycle.LifecycleState, IHasLifecycle.ObjectClosedException, IHasLifecycle.ObjectOpenException| Modifier and Type | Method and Description |
|---|---|
IExceptionEntry |
getExceptionEntry(IExceptionEntryID id)
Retrieves the exception entry for the specified id from the database.
|
IExceptionEntry |
getExceptionEntry(String surfaceForm,
POS pos)
Retrieves the exception entry for the specified surface form and part of
speech from the database.
|
Iterator<IExceptionEntry> |
getExceptionEntryIterator(POS pos)
Returns an iterator that will iterate over all exception entries of the
specified part of speech.
|
IIndexWord |
getIndexWord(IIndexWordID id)
Retrieves the specified index word object from the database.
|
IIndexWord |
getIndexWord(String lemma,
POS pos)
This method is identical to
getIndexWord(IIndexWordID) and
is provided as a convenience. |
Iterator<IIndexWord> |
getIndexWordIterator(POS pos)
Returns an iterator that will iterate over all index words of the
specified part of speech.
|
ISenseEntry |
getSenseEntry(ISenseKey key)
Retrieves the sense entry for the specified sense key from the database.
|
Iterator<ISenseEntry> |
getSenseEntryIterator()
Returns an iterator that will iterate over all sense entries in the
dictionary.
|
ISynset |
getSynset(ISynsetID id)
Retrieves the synset with the specified id from the database.
|
Iterator<ISynset> |
getSynsetIterator(POS pos)
Returns an iterator that will iterate over all synsets of the specified
part of speech.
|
IWord |
getWord(ISenseKey key)
Retrieves the word with the specified sense key from the database.
|
IWord |
getWord(IWordID id)
Retrieves the word with the specified id from the database.
|
void |
setCharset(Charset charset)
Sets the character set associated with this dictionary.
|
getVersionisOpen, opengetCharsetvoid setCharset(Charset charset)
null.charset - the possibly null character set to use when
decoding files.IIndexWord getIndexWord(String lemma, POS pos)
getIndexWord(IIndexWordID) and
is provided as a convenience.lemma - the lemma for the index word requested; may not be
null, empty, or all whitespacepos - the part of speech; may not be nullnull if none is foundNullPointerException - if either argument is nullIllegalArgumentException - if the specified lemma is empty or all whitespaceIIndexWord getIndexWord(IIndexWordID id)
null.
Note: This call does no stemming on the specified lemma, it is
taken as specified. That is, if you submit the word "dogs", it will
search for "dogs", not "dog"; in the standard Wordnet distribution, there
is no entry for "dogs" and therefore the call will return
null. This is in contrast to the Wordnet API provided by
Princeton. If you want your searches to capture morphological variation,
use the descendants of the IStemmer class.
id - the id of the index word to search for; may not be
nullnull otherwiseNullPointerException - if the argument is nullIterator<IIndexWord> getIndexWordIterator(POS pos)
pos - the part of speech over which to iterate; may not be
nullNullPointerException - if the argument is nullIWord getWord(IWordID id)
nullid - the id of the word to search for; may not be nullnull otherwiseNullPointerException - if the argument is nullIWord getWord(ISenseKey key)
nullkey - the sense key of the word to search for; may not be
nullnull otherwiseNullPointerException - if the argument is nullISynset getSynset(ISynsetID id)
nullid - the id of the synset to search for; may not be
nullnull otherwiseNullPointerException - if the argument is nullIterator<ISynset> getSynsetIterator(POS pos)
pos - the part of speech over which to iterate; may not be
nullNullPointerException - if the argument is nullISenseEntry getSenseEntry(ISenseKey key)
nullkey - the sense key of the entry to search for; may not be
nullnull otherwiseNullPointerException - if the argument is nullIterator<ISenseEntry> getSenseEntryIterator()
IExceptionEntry getExceptionEntry(String surfaceForm, POS pos)
nullsurfaceForm - the surface form to be looked up; may not be null
, empty, or all whitespacepos - the part of speech; may not be nullnull otherwiseNullPointerException - if either argument is nullIllegalArgumentException - if the specified surface form is empty or all whitespaceIExceptionEntry getExceptionEntry(IExceptionEntryID id)
nullid - the exception entry id of the entry to search for; may not be
nullIterator<IExceptionEntry> getExceptionEntryIterator(POS pos)
pos - the part of speech over which to iterate; may not be
nullNullPointerException - if the argument is nullCopyright © 2018. All rights reserved.