Class Conll03NameSampleStream

Namespace
NOpenNLP.Tools.Formats
Assembly
NOpenNLP.Tools.dll

An import stream which can parse the CONLL03 data.

public class Conll03NameSampleStream : ObjectStreamBase<NameSample?>, IObjectStream<NameSample?>, IDisposable
Inheritance
Conll03NameSampleStream
Implements
Inherited Members

Constructors

Conll03NameSampleStream(Language, IInputStreamFactory, int)

public Conll03NameSampleStream(Conll03NameSampleStream.Language lang, IInputStreamFactory @in, int types)

Parameters

lang Conll03NameSampleStream.Language
in IInputStreamFactory
types int

Exceptions

IOException

if there is an error during reading

Conll03NameSampleStream(Language, IObjectStream<string?>, int)

public Conll03NameSampleStream(Conll03NameSampleStream.Language lang, IObjectStream<string?> lineStream, int types)

Parameters

lang Conll03NameSampleStream.Language

the language of the CONLL 03 data

lineStream IObjectStream<string>

an Object Stream over the lines in the CONLL 03 data file

types int

the entity types to include in the Name Sample object stream

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

Returns

NameSample

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

IOException

if there is an error during resetting the stream