Class EmptyLinePreprocessorStream
- Namespace
- NOpenNLP.Tools.Sentdetect
- Assembly
- NOpenNLP.Tools.dll
Stream to to clean up empty lines for empty line separated document streams.
- Skips empty line at training data start
- Transforms multiple empty lines in a row into one
- Replaces white space lines with empty lines
- TODO: Terminates last document with empty line if it is missing
This stream should be used by the components that mark empty lines to mark document boundaries.
Do not use this class, internal use only!
public class EmptyLinePreprocessorStream : FilterObjectStream<string?, string?>, IObjectStream<string?>, IDisposable
- Inheritance
-
EmptyLinePreprocessorStream
- Implements
- Inherited Members
Constructors
EmptyLinePreprocessorStream(IObjectStream<string?>)
Stream to to clean up empty lines for empty line separated document streams.
- Skips empty line at training data start
- Transforms multiple empty lines in a row into one
- Replaces white space lines with empty lines
- TODO: Terminates last document with empty line if it is missing
This stream should be used by the components that mark empty lines to mark document boundaries.
Do not use this class, internal use only!
public EmptyLinePreprocessorStream(IObjectStream<string?> @in)
Parameters
inIObjectStream<string>
Methods
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 string? Read()
Returns
- string
the next object or
nullto signal that the stream is exhausted
Exceptions
- IOException
if there is an error during reading