Class SequenceStreamEventStream<T>

Namespace
NOpenNLP.Tools.Ml.Model
Assembly
NOpenNLP.Tools.dll

Class which turns a sequence stream into an event stream.

public class SequenceStreamEventStream<T> : ObjectStreamBase<Event?>, IObjectStream<Event?>, IDisposable

Type Parameters

T

The type of the object which is the source of each sequence.

Inheritance
SequenceStreamEventStream<T>
Implements
Inherited Members

Constructors

SequenceStreamEventStream(ISequenceStream<T>)

Class which turns a sequence stream into an event stream.

public SequenceStreamEventStream(ISequenceStream<T> sequenceStream)

Parameters

sequenceStream ISequenceStream<T>

Methods

Dispose(bool)

Releases the resources from this object stream.

protected override void Dispose(bool disposing)

Parameters

disposing bool

Read()

Returns the next object. Calling this method repeatedly until it returns null will return each object from the underlying source exactly once.

public override Event? Read()

Returns

Event

the next object or null to signal that the stream is exhausted

Exceptions

IOException

if there is an error during reading

Reset()

Repositions the stream at the beginning and the previously seen object sequence will be repeated exactly. This method can be used to re-read the stream if multiple passes over the objects are required.

The implementation of this method is optional.

public override void Reset()

Exceptions

IOException

if there is an error during resetting the stream

NotSupportedException

if reset is not supported on this stream