org.apache.lucene.chunk
Class Chunk

Object
  extended by Chunk
Direct Known Subclasses:
XtfChunk

public class Chunk
extends Object

Keeps track of all the tokens in a given chunk of text, also maintaining a reference back to the source of the chunk. Instances of this class are typically created by and cached by a ChunkSource.


Field Summary
 int chunkNum
          Absolute number (i.e. document ID) of this chunk
 int maxWordPos
          Absolute word position of the last token
 int minWordPos
          Absolute word position of the first token
 ChunkSource source
          The source of this chunk
 String text
          Original text value of the chunk
 Token[] tokens
          Tokens extracted from the text
 
Constructor Summary
Chunk(ChunkSource source, int chunkNum)
          Construct a new chunk
 
Method Summary
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

public ChunkSource source
The source of this chunk


chunkNum

public int chunkNum
Absolute number (i.e. document ID) of this chunk


text

public String text
Original text value of the chunk


tokens

public Token[] tokens
Tokens extracted from the text


minWordPos

public int minWordPos
Absolute word position of the first token


maxWordPos

public int maxWordPos
Absolute word position of the last token

Constructor Detail

Chunk

public Chunk(ChunkSource source,
             int chunkNum)
Construct a new chunk