public class StreamTagger extends Object
java.io.Reader
See examples.StreamTaggerDemo in the Sen source for an example of how to use this class
Thread Safety: Objects of this class are NOT thread safe and
should not be accessed simultaneously by multiple threads. Note that creating
additional instances using SenFactory is relatively cheap in both
memory and time
| Constructor and Description |
|---|
StreamTagger(StringTagger stringTagger,
Reader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(StreamFilter filter)
Adds a
StreamFilter |
boolean |
hasNext()
Tests if more
Tokens are available |
Token |
next()
Returns the next available token
|
public StreamTagger(StringTagger stringTagger, Reader reader)
stringTagger - The StringTagger to use to tokenise the read textreader - The Reader to read text frompublic boolean hasNext()
throws IOException
Tokens are availabletrue if more Tokens are available, otherwise
falseIOExceptionpublic Token next() throws IOException
IOExceptionpublic void addFilter(StreamFilter filter)
StreamFilterfilter - The StreamFilter to add