public static class LazyTermDocVector.Reader extends Object implements TermDocVector.Reader
| Constructor and Description |
|---|
LazyTermDocVector.Reader(int nTerms,
byte[] bytes,
String[] terms) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfTerms()
Returns the total number of terms in this document.
|
int[] |
getPositions()
Returns the position offsets of the current term as an array.
|
boolean |
getPositions(TermPositions tp)
Returns the position offsets of the current term as a
TermPositions object. |
short |
getTf()
Returns the term frequency of the current term.
|
boolean |
hasMoreTerms()
Returns
true if there are more terms to read. |
String |
nextTerm()
Returns the next term.
|
void |
reset()
Resets the reader to the beginning of the document.
|
public LazyTermDocVector.Reader(int nTerms,
byte[] bytes,
String[] terms)
throws IOException
IOExceptionpublic int getNumberOfTerms()
TermDocVector.ReadergetNumberOfTerms in interface TermDocVector.Readerpublic int[] getPositions()
TermDocVector.ReadergetPositions in interface TermDocVector.Readerpublic boolean getPositions(TermPositions tp)
TermDocVector.ReaderTermPositions object.getPositions in interface TermDocVector.ReaderTermPositions representing offsets of the current term.public short getTf()
TermDocVector.ReadergetTf in interface TermDocVector.Readerpublic boolean hasMoreTerms()
TermDocVector.Readertrue if there are more terms to read.hasMoreTerms in interface TermDocVector.Readertrue if there are more terms to readpublic String nextTerm()
TermDocVector.ReadernextTerm in interface TermDocVector.Readerpublic void reset()
TermDocVector.Readerreset in interface TermDocVector.Reader