class BoundedWordIter extends BasicWordIter
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
boundSize |
maxWordPos, text, tokens, tokNum, wordPosFIELD_END, FIELD_START, TERM_END, TERM_END_PLUS, TERM_START| Constructor and Description |
|---|
BoundedWordIter(String text,
TokenStream stream,
int boundSize)
Construct a bounded word iterator on the given text.
|
| Modifier and Type | Method and Description |
|---|---|
MarkPos |
getPos(int startOrEnd)
Create a new place to hold position info
|
void |
getPos(MarkPos pos,
int startOrEnd)
Get the position of the end of the current word.
|
boolean |
next(boolean force)
Advance to the next token.
|
boolean |
prev(boolean force)
Go to the previous token.
|
clone, seekFirst, seekLast, termpublic BoundedWordIter(String text,
TokenStream stream,
int boundSize)
throws IOException
IOExceptionpublic final boolean next(boolean force)
next in interface WordIternext in class BasicWordIterforce - true to ignore section boundariespublic final boolean prev(boolean force)
prev in interface WordIterprev in class BasicWordIterforce - true to ignore section boundariespublic MarkPos getPos(int startOrEnd)
getPos in interface WordItergetPos in class BasicWordIterstartOrEnd - FIELD_START for the very start of the field;
TERM_START for the first character of the word;
TERM_END for the last character of the word;
TERM_END_PLUS for the last character plus any trailing
punctuation and/or spaces;
FIELD_END for the very last end of the field.public void getPos(MarkPos pos, int startOrEnd)
getPos in interface WordItergetPos in class BasicWordIterstartOrEnd - FIELD_START for the very start of the field;
TERM_START for the first character of the word;
TERM_END for the last character of the word;
TERM_END_PLUS for the last character plus any trailing
punctuation and/or spaces;
FIELD_END for the very last end of the field.