opennlp.tools.util
Class AbstractEventStream<T>

java.lang.Object
  extended by opennlp.model.AbstractEventStream
      extended by opennlp.tools.util.AbstractEventStream<T>
All Implemented Interfaces:
opennlp.model.EventStream
Direct Known Subclasses:
AbstractParserEventStream, DocumentCategorizerEventStream, NameFinderEventStream, POSSampleEventStream, SDEventStream, TokSpanEventStream

public abstract class AbstractEventStream<T>
extends opennlp.model.AbstractEventStream

This is a base class for EventStream classes. It takes an Iterator of sample objects as input and outputs the events creates by a subclass.


Constructor Summary
AbstractEventStream(ObjectStream<T> samples)
          Initializes the current instance with a sample Iterator.
 
Method Summary
 boolean hasNext()
          Checks if there are more training events available.
 opennlp.model.Event next()
           
 
Methods inherited from class opennlp.model.AbstractEventStream
remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEventStream

public AbstractEventStream(ObjectStream<T> samples)
Initializes the current instance with a sample Iterator.

Parameters:
samples - the sample Iterator.
Method Detail

hasNext

public final boolean hasNext()
                      throws IOException
Checks if there are more training events available.

Throws:
IOException

next

public final opennlp.model.Event next()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.