Class ADPOSSampleStream

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

Note: Do not use this class, internal use only!

public class ADPOSSampleStream : ObjectStreamBase<POSSample?>, IObjectStream<POSSample?>, IDisposable
Inheritance
ADPOSSampleStream
Implements
Inherited Members

Constructors

ADPOSSampleStream(IInputStreamFactory, string, bool, bool)

Creates a new POSSample stream from a Stream.

public ADPOSSampleStream(IInputStreamFactory @in, string charsetName, bool expandME, bool includeFeatures)

Parameters

in IInputStreamFactory

the Corpus Stream

charsetName string

the charset of the Arvores Deitadas Corpus

expandME bool

if true will expand the multiword expressions, each word of the expression will have the POS Tag that was attributed to the expression plus the prefix B- or I- (CONLL convention)

includeFeatures bool

if true will combine the POS Tag with the feature tags

Exceptions

IOException

if there is an error during reading

ADPOSSampleStream(IObjectStream<string?>, bool, bool)

Creates a new POSSample stream from a line stream, i.e. IObjectStream<T> of string, that could be a PlainTextByLineStream object.

public ADPOSSampleStream(IObjectStream<string?> lineStream, bool expandME, bool includeFeatures)

Parameters

lineStream IObjectStream<string>

a stream of lines as string

expandME bool

if true will expand the multiword expressions, each word of the expression will have the POS Tag that was attributed to the expression plus the prefix B- or I- (CONLL convention)

includeFeatures bool

if true will combine the POS Tag with the feature tags

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

Returns

POSSample

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

NotSupportedException

if the underlying stream does not support resetting