Class Conll02NameSampleStream
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/
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
langConll02NameSampleStream.LanguageinIInputStreamFactorytypesint
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
langConll02NameSampleStream.LanguagelineStreamIObjectStream<string>typesint
Fields
DocStart
public const string DocStart = "-DOCSTART-"
Field Value
GenerateLocationEntities
public const int GenerateLocationEntities = 4
Field Value
GenerateMiscEntities
public const int GenerateMiscEntities = 8
Field Value
GenerateOrganizationEntities
public const int GenerateOrganizationEntities = 2
Field Value
GeneratePersonEntities
public const int GeneratePersonEntities = 1
Field Value
Methods
Dispose(bool)
Releases the resources from this object stream.
protected override void Dispose(bool disposing)
Parameters
disposingbool
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
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