opennlp.maxent
Class BasicEventStream

java.lang.Object
  extended by opennlp.model.AbstractEventStream
      extended by opennlp.maxent.BasicEventStream
All Implemented Interfaces:
EventStream

public class BasicEventStream
extends AbstractEventStream

A object which can deliver a stream of training events assuming that each event is represented as a separated list containing all the contextual predicates, with the last item being the outcome. The default separator is the space " ". e.g.:

cp_1 cp_2 ... cp_n outcome

cp_1,cp_2,...,cp_n,outcome


Constructor Summary
BasicEventStream(DataStream ds)
           
BasicEventStream(DataStream ds, String sep)
           
 
Method Summary
 boolean hasNext()
          Test whether there are any Events remaining in this EventStream.
 Event next()
          Returns the next Event object held in this EventStream.
 
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

BasicEventStream

public BasicEventStream(DataStream ds,
                        String sep)

BasicEventStream

public BasicEventStream(DataStream ds)
Method Detail

next

public Event next()
Returns the next Event object held in this EventStream. Each call to nextEvent advances the EventStream.

Returns:
the Event object which is next in this EventStream

hasNext

public boolean hasNext()
Test whether there are any Events remaining in this EventStream.

Returns:
true if this EventStream has more Events


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