|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMWEIndex
An index of multi-word expressions (MWEs). The individual components of a multi-word expression are called the MWE's parts. This interface provides methods for retrieving MWEs based on their constituent parts, and for testing for the inclusion of a particular MWE in the index.
Field Summary | |
---|---|
static String |
commentDoubleSemicolon
Denotes that the following text is a comment. |
static String |
commentDoubleSlash
Denotes that the following text is a comment. |
Method Summary | |
---|---|
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. |
Set<? extends IRootMWEDesc> |
get(String part)
Returns a set of IRootMWEDesc objects whose MWEs contain the
specified part. |
Set<? extends IMWEDesc> |
getAll(String part)
Returns a set containing both IRootMWEDesc and IInfMWEDesc
objects that the given string is a part of. |
Iterator<String> |
getIndexIterator()
Returns an iterator that will iterate over all MWE parts in the index, in order. |
IInfMWEDesc |
getInflectedMWEDesc(String lemma,
MWEPOS pos,
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. |
Iterator<IRootMWEDesc> |
getRootIterator()
Returns an iterator that will iterate over all root MWE descriptions in the index, in order. |
IRootMWEDesc |
getRootMWEDesc(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. |
Field Detail |
---|
static final String commentDoubleSlash
static final String commentDoubleSemicolon
Method Detail |
---|
boolean open() throws 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.
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.
IOException
- if an IO exception is thrown while opening the indexvoid 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
none
IllegalStateException
- if this method is called when the index is closedIRootMWEDesc getRootMWEDesc(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 none
IllegalStateException
- if this method is called when the index is closedIInfMWEDesc getInflectedMWEDesc(String lemma, MWEPOS pos, 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 none
IllegalStateException
- if this method is called when the index is closedSet<? extends IRootMWEDesc> get(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
retrieved
NullPointerException
- if the specified part is null
IllegalArgumentException
- if the specified part is empty or all whitespace
IllegalStateException
- if this method is called when the index is closedSet<? extends IMWEDesc> getAll(String part)
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
retrieved
NullPointerException
- if the specified part is null
IllegalArgumentException
- if the specified part is empty or all whitespace
IllegalStateException
- if this method is called when the index is closedIterator<IRootMWEDesc> getRootIterator()
Iterator<String> getIndexIterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |