Class ChunkSampleSequenceStream

Namespace
NOpenNLP.Tools.Chunker
Assembly
NOpenNLP.Tools.dll
public class ChunkSampleSequenceStream : ObjectStreamBase<Sequence<ChunkSample>?>, ISequenceStream<ChunkSample>, IObjectStream<Sequence<ChunkSample>?>, IDisposable
Inheritance
ChunkSampleSequenceStream
Implements
Inherited Members

Constructors

ChunkSampleSequenceStream(IObjectStream<ChunkSample?>, IChunkerContextGenerator)

public ChunkSampleSequenceStream(IObjectStream<ChunkSample?> samples, IChunkerContextGenerator contextGenerator)

Parameters

samples IObjectStream<ChunkSample>
contextGenerator IChunkerContextGenerator

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 Sequence<ChunkSample>? Read()

Returns

Sequence<ChunkSample>

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

Exceptions

IOException

if there is an error during reading

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

UpdateContext(Sequence<ChunkSample>, AbstractModel)

Creates a new event array based on the outcomes predicted by the specified parameters for the specified sequence.

public virtual Event[] UpdateContext(Sequence<ChunkSample> sequence, AbstractModel model)

Parameters

sequence Sequence<ChunkSample>

The sequence to be evaluated.

model AbstractModel

The model to use for the evaluation.

Returns

Event[]

event array