opennlp.maxent
Class BasicEventStream
java.lang.Object
opennlp.model.AbstractEventStream
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
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. |
BasicEventStream
public BasicEventStream(DataStream ds,
String sep)
BasicEventStream
public BasicEventStream(DataStream ds)
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.