Class Conll02NameSampleStream

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

Parser for the dutch and spanish ner training files of the CONLL 2002 shared task.

The dutch data has a -DOCSTART- tag to mark article boundaries, adaptive data in the feature generators will be cleared before every article.
The spanish data does not contain article boundaries, adaptive data will be cleared for every sentence.

The data contains four named entity types: Person, Organization, Location and Misc.

Data can be found on this web site:
http://www.cnts.ua.ac.be/conll2002/ner/

Note: Do not use this class, internal use only!
public class Conll02NameSampleStream : ObjectStreamBase<NameSample?>, IObjectStream<NameSample?>, IDisposable
Inheritance
Conll02NameSampleStream
Implements
Inherited Members

Constructors

Conll02NameSampleStream(Language, IInputStreamFactory, int)

public Conll02NameSampleStream(Conll02NameSampleStream.Language lang, IInputStreamFactory @in, int types)

Parameters

lang Conll02NameSampleStream.Language
in IInputStreamFactory
types int

Exceptions

IOException

if there is an error during reading

Conll02NameSampleStream(Language, IObjectStream<string?>, int)

public Conll02NameSampleStream(Conll02NameSampleStream.Language lang, IObjectStream<string?> lineStream, int types)

Parameters

lang Conll02NameSampleStream.Language
lineStream IObjectStream<string>
types int

Fields

DocStart

public const string DocStart = "-DOCSTART-"

Field Value

string

GenerateLocationEntities

public const int GenerateLocationEntities = 4

Field Value

int

GenerateMiscEntities

public const int GenerateMiscEntities = 8

Field Value

int

GenerateOrganizationEntities

public const int GenerateOrganizationEntities = 2

Field Value

int

GeneratePersonEntities

public const int GeneratePersonEntities = 1

Field Value

int

Methods

Dispose(bool)

Releases the resources from this object stream.

protected override void Dispose(bool disposing)

Parameters

disposing bool

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

Reset()

Repositions the stream at the beginning and the previously seen object sequence will be repeated exactly. This method can be used to re-read the stream if multiple passes over the objects are required.

The implementation of this method is optional.

public override void Reset()

Exceptions

IOException

if there is an error during resetting the stream

NotSupportedException

if reset is not supported on this stream

IOException

if there is an error during resetting the stream