public interface IMWEIndex
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
commentDoubleSemicolon
Denotes that the following text is a comment.
|
static java.lang.String |
commentDoubleSlash
Denotes that the following text is a comment.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the index if open.
|
IMWEDesc |
get(IMWEDescID id)
Returns the MWE description for the specified ID, or
null if
this index does not contain said description. |
java.util.Set<? extends IRootMWEDesc> |
get(java.lang.String part)
Returns a set of
IRootMWEDesc objects whose MWEs contain the
specified part. |
java.util.Set<? extends IMWEDesc> |
getAll(java.lang.String part)
Returns a set containing both
IRootMWEDesc and IInfMWEDesc
objects that the given string is a part of. |
java.util.Iterator<java.lang.String> |
getIndexIterator()
Returns an iterator that will iterate over all MWE parts in the index, in
order.
|
IInfMWEDesc |
getInflectedMWEDesc(java.lang.String lemma,
MWEPOS pos,
java.lang.String inflected)
Returns the inflected MWE description for the specified root lemma, part
of speech, and inflected form, or
null if this index does
not contain said description. |
java.util.Iterator<IRootMWEDesc> |
getRootIterator()
Returns an iterator that will iterate over all root MWE descriptions in
the index, in order.
|
IRootMWEDesc |
getRootMWEDesc(java.lang.String lemma,
MWEPOS pos)
Returns the root MWE description for the specified lemma and part of
speech, or
null if this index does not contain said
description. |
boolean |
isOpen()
Returns whether the index is open.
|
boolean |
open()
Prepares the index for use.
|
static final java.lang.String commentDoubleSlash
static final java.lang.String commentDoubleSemicolon
boolean open() throws java.io.IOException
IllegalStateException
.
Once open, an index can be closed by calling the close()
method.true
if the call succeeded, and the index is ready
to service calls; false
otherwise.java.io.IOException
- if an IO exception is thrown while opening the indexboolean isOpen()
true
if the index is open and ready to accept
calls; false
otherwise.void close()
IMWEDesc get(IMWEDescID id)
null
if
this index does not contain said description.id
- the id for the MWE description desired; may not be
null
null
if
nonejava.lang.IllegalStateException
- if this method is called when the index is closedIRootMWEDesc getRootMWEDesc(java.lang.String lemma, MWEPOS pos)
null
if this index does not contain said
description.lemma
- the lemma for the MWE description desired; may not be
null
pos
- the part of speech for the MWE description desired; may not be
null
null
if nonejava.lang.IllegalStateException
- if this method is called when the index is closedIInfMWEDesc getInflectedMWEDesc(java.lang.String lemma, MWEPOS pos, java.lang.String inflected)
null
if this index does
not contain said description.lemma
- the lemma for the MWE description desired; may not be
null
pos
- the part of speech for the MWE description desired; may not be
null
inflected
- the inflected form of the MWE description desired; may not be
null
null
if nonejava.lang.IllegalStateException
- if this method is called when the index is closedjava.util.Set<? extends IRootMWEDesc> get(java.lang.String part)
IRootMWEDesc
objects whose MWEs contain the
specified part. Retrieval is insensitive to case. If no entries are
found, this method returns an empty set. The order of the returned set is
implementation dependent.part
- a string representing the part for which entries should be
retrievedjava.lang.NullPointerException
- if the specified part is null
java.lang.IllegalArgumentException
- if the specified part is empty or all whitespacejava.lang.IllegalStateException
- if this method is called when the index is closedjava.util.Set<? extends IMWEDesc> getAll(java.lang.String part)
IRootMWEDesc
and IInfMWEDesc
objects that the given string is a part of. Retrieval is insensitive to
case. If no entries are found, this method returns an empty set. The
order of the returned set is implementation dependent.part
- a string representing the part for which entries should be
retrievedjava.lang.NullPointerException
- if the specified part is null
java.lang.IllegalArgumentException
- if the specified part is empty or all whitespacejava.lang.IllegalStateException
- if this method is called when the index is closedjava.util.Iterator<IRootMWEDesc> getRootIterator()
java.util.Iterator<java.lang.String> getIndexIterator()
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.