|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDictionary
Objects that implement this interface are intended as the main entry point to
accessing Wordnet data. The dictionary must be opened by calling
open()
before it is used, otherwise its methods throw an
IllegalStateException
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.mit.jwi.data.IHasLifecycle |
---|
IHasLifecycle.LifecycleState, IHasLifecycle.ObjectClosedException, IHasLifecycle.ObjectOpenException |
Method Summary | |
---|---|
IExceptionEntry |
getExceptionEntry(IExceptionEntryID id)
Retrieves the exception entry for the specified id from the database. |
IExceptionEntry |
getExceptionEntry(java.lang.String surfaceForm,
POS pos)
Retrieves the exception entry for the specified surface form and part of speech from the database. |
java.util.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(java.lang.String lemma,
POS pos)
This method is identical to getIndexWord(IIndexWordID) and
is provided as a convenience. |
java.util.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. |
java.util.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. |
java.util.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(java.nio.charset.Charset charset)
Sets the character set associated with this dictionary. |
Methods inherited from interface edu.mit.jwi.item.IHasVersion |
---|
getVersion |
Methods inherited from interface edu.mit.jwi.data.IHasLifecycle |
---|
isOpen, open |
Methods inherited from interface edu.mit.jwi.data.IClosable |
---|
close |
Methods inherited from interface edu.mit.jwi.data.IHasCharset |
---|
getCharset |
Method Detail |
---|
void setCharset(java.nio.charset.Charset charset)
null
.
charset
- the possibly null
character set to use when
decoding files.IIndexWord getIndexWord(java.lang.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 null
null
if none is found
java.lang.NullPointerException
- if either argument is null
java.lang.IllegalArgumentException
- 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
null
null
otherwise
java.lang.NullPointerException
- if the argument is null
java.util.Iterator<IIndexWord> getIndexWordIterator(POS pos)
pos
- the part of speech over which to iterate; may not be
null
java.lang.NullPointerException
- if the argument is null
IWord getWord(IWordID id)
null
id
- the id of the word to search for; may not be null
null
otherwise
java.lang.NullPointerException
- if the argument is null
IWord getWord(ISenseKey key)
null
key
- the sense key of the word to search for; may not be
null
null
otherwise
java.lang.NullPointerException
- if the argument is null
ISynset getSynset(ISynsetID id)
null
id
- the id of the synset to search for; may not be
null
null
otherwise
java.lang.NullPointerException
- if the argument is null
java.util.Iterator<ISynset> getSynsetIterator(POS pos)
pos
- the part of speech over which to iterate; may not be
null
java.lang.NullPointerException
- if the argument is null
ISenseEntry getSenseEntry(ISenseKey key)
null
key
- the sense key of the entry to search for; may not be
null
null
otherwise
java.lang.NullPointerException
- if the argument is null
java.util.Iterator<ISenseEntry> getSenseEntryIterator()
IExceptionEntry getExceptionEntry(java.lang.String surfaceForm, POS pos)
null
surfaceForm
- the surface form to be looked up; may not be null
, empty, or all whitespacepos
- the part of speech; may not be null
null
otherwise
java.lang.NullPointerException
- if either argument is null
java.lang.IllegalArgumentException
- if the specified surface form is empty or all whitespaceIExceptionEntry getExceptionEntry(IExceptionEntryID id)
null
id
- the exception entry id of the entry to search for; may not be
null
java.util.Iterator<IExceptionEntry> getExceptionEntryIterator(POS pos)
pos
- the part of speech over which to iterate; may not be
null
java.lang.NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |