Class NameSampleDataStream

Namespace
NOpenNLP.Tools.Namefind
Assembly
NOpenNLP.Tools.dll

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

in IObjectStream<string>

Fields

END_TAG

public const string END_TAG = "<END>"

Field Value

string

START_TAG

public const string START_TAG = "<START>"

Field Value

string

START_TAG_PREFIX

public const string START_TAG_PREFIX = "<START:"

Field Value

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

Returns

NameSample

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