opennlp.maxent
Class PlainTextByLineDataStream
java.lang.Object
opennlp.maxent.PlainTextByLineDataStream
- All Implemented Interfaces:
- DataStream
public class PlainTextByLineDataStream
- extends Object
- implements DataStream
This DataStream implementation will take care of reading a plain text file
and returning the Strings between each new line character, which is what
many Maxent applications need in order to create EventStreams.
Method Summary |
boolean |
hasNext()
Test whether there are any Events remaining in this EventStream. |
Object |
nextToken()
Returns the next slice of data held in this DataStream. |
PlainTextByLineDataStream
public PlainTextByLineDataStream(Reader dataSource)
nextToken
public Object nextToken()
- Description copied from interface:
DataStream
- Returns the next slice of data held in this DataStream.
- Specified by:
nextToken
in interface DataStream
- Returns:
- the Object representing the data which is next in this DataStream
hasNext
public boolean hasNext()
- Description copied from interface:
DataStream
- Test whether there are any Events remaining in this EventStream.
- Specified by:
hasNext
in interface DataStream
- Returns:
- true if this DataStream has more data tokens
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.