Class NameSampleDataStream
The NameSampleDataStream class converts tagged strings
provided by an IObjectStream<T> to NameSample objects.
It uses text that is one-sentence per line and tokenized
with names identified by <START> and <END> tags.
public class NameSampleDataStream : FilterObjectStream<string?, NameSample?>, IObjectStream<NameSample?>, IDisposable
- Inheritance
-
NameSampleDataStream
- Implements
- Inherited Members
Constructors
NameSampleDataStream(IObjectStream<string?>)
The NameSampleDataStream class converts tagged strings
provided by an IObjectStream<T> to NameSample objects.
It uses text that is one-sentence per line and tokenized
with names identified by <START> and <END> tags.
public NameSampleDataStream(IObjectStream<string?> @in)
Parameters
inIObjectStream<string>
Fields
END_TAG
public const string END_TAG = "<END>"
Field Value
START_TAG
public const string START_TAG = "<START>"
Field Value
START_TAG_PREFIX
public const string START_TAG_PREFIX = "<START:"
Field Value
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 NameSample? Read()
Returns
- NameSample
the next object or
nullto signal that the stream is exhausted
Exceptions
- IOException
if there is an error during reading
- IOException
if there is an error during reading