Class DocumentToLineStream

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

Reads a plain text file and return each line as a string object.

public class DocumentToLineStream : SegmenterObjectStream<string, string>, IObjectStream<string?>, IDisposable
Inheritance
DocumentToLineStream
Implements
Inherited Members

Constructors

DocumentToLineStream(IObjectStream<string?>)

Reads a plain text file and return each line as a string object.

public DocumentToLineStream(IObjectStream<string?> samples)

Parameters

samples IObjectStream<string>

Methods

Read(string)

Splits the given sample into the samples this stream emits.

protected override IList<string>? Read(string sample)

Parameters

sample string

the incoming sample to segment

Returns

IList<string>

the outgoing samples, or null if the sample produced none

Exceptions

IOException

if there is an error during reading

IOException

if there is an error during reading