opennlp.maxent
Class BasicEventStream

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

public class BasicEventStream
extends java.lang.Object
implements EventStream

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

cp_1 cp_2 ... cp_n outcome

Version:
$Revision: 1.3 $, $Date: 2007/03/21 19:02:10 $
Author:
Jason Baldridge

Constructor Summary
BasicEventStream(DataStream ds)
           
 
Method Summary
 boolean hasNext()
          Test whether there are any Events remaining in this EventStream.
 Event nextEvent()
          Returns the next Event object held in this EventStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicEventStream

public BasicEventStream(DataStream ds)
Method Detail

nextEvent

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

Specified by:
nextEvent in interface 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.

Specified by:
hasNext in interface EventStream
Returns:
true if this EventStream has more Events


Copyright © 2005 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.