Class SentenceSampleStream
- Namespace
- NOpenNLP.Tools.Sentdetect
- Assembly
- NOpenNLP.Tools.dll
This class is a stream filter which reads a sentence by line samples from
a Reader and converts them into SentenceSample objects.
An empty line indicates the begin of a new document.
public class SentenceSampleStream : FilterObjectStream<string?, SentenceSample?>, IObjectStream<SentenceSample?>, IDisposable
- Inheritance
-
SentenceSampleStream
- Implements
- Inherited Members
Constructors
SentenceSampleStream(IObjectStream<string?>)
This class is a stream filter which reads a sentence by line samples from
a Reader and converts them into SentenceSample objects.
An empty line indicates the begin of a new document.
public SentenceSampleStream(IObjectStream<string?> sentences)
Parameters
sentencesIObjectStream<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 SentenceSample? Read()
Returns
- SentenceSample
the next object or
nullto signal that the stream is exhausted
Exceptions
- IOException
if there is an error during reading
ReplaceNewLineEscapeTags(string)
public static string ReplaceNewLineEscapeTags(string s)
Parameters
sstring