opennlp.grok.preprocess.sentdetect
Class SDEventStream

java.lang.Object
  |
  +--opennlp.grok.preprocess.sentdetect.SDEventStream
All Implemented Interfaces:
opennlp.maxent.EventStream

public class SDEventStream
extends java.lang.Object
implements opennlp.maxent.EventStream

An implementation of EventStream which assumes that it is receiving its data as one (valid) sentence per token. The default DataStream to use with this class is PlainTextByLineDataStream, but you can provide other types of DataStreams if you wish to receive data from sources other than plain text files; however, be sure that each token your DataStream returns is a valid sentence.

Version:
$Revision: 1.6 $, $Date: 2002/02/08 12:13:37 $
Author:
Jason Baldridge, Eric D. Friedman

Constructor Summary
SDEventStream(opennlp.maxent.DataStream d)
          Creates a new SDEventStream instance.
SDEventStream(opennlp.maxent.DataStream d, EndOfSentenceScanner s)
          Class constructor which uses the EndOfSentenceScanner to locate sentence endings.
SDEventStream(opennlp.maxent.DataStream d, EndOfSentenceScanner s, opennlp.maxent.ContextGenerator cg)
           
 
Method Summary
 boolean hasNext()
           
 opennlp.maxent.Event nextEvent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDEventStream

public SDEventStream(opennlp.maxent.DataStream d)
Creates a new SDEventStream instance. A DefaultEndOfSentenceScanner is used to locate sentence endings.

Parameters:
d - a DataStream value

SDEventStream

public SDEventStream(opennlp.maxent.DataStream d,
                     EndOfSentenceScanner s)
Class constructor which uses the EndOfSentenceScanner to locate sentence endings.


SDEventStream

public SDEventStream(opennlp.maxent.DataStream d,
                     EndOfSentenceScanner s,
                     opennlp.maxent.ContextGenerator cg)
Method Detail

nextEvent

public opennlp.maxent.Event nextEvent()
Specified by:
nextEvent in interface opennlp.maxent.EventStream

hasNext

public boolean hasNext()
Specified by:
hasNext in interface opennlp.maxent.EventStream


Copyright © 2003 Jason Baldridge and Gann Bierner. All Rights Reserved.