Class ADNameSampleStream
Parser for Floresta Sita(c)tica Arvores Deitadas corpus, output to for the Portuguese NER training.
The data contains four named entity types: Person, Organization, Group,
Place, Event, ArtProd, Abstract, Thing, Time and Numeric.
Data can be found on this web site:
http://www.linguateca.pt/floresta/corpus.html
Information about the format:
Susana Afonso.
"Árvores deitadas: Descrição do formato e das opções de análise na Floresta Sintáctica"
.
12 de Fevereiro de 2006.
http://www.linguateca.pt/documentos/Afonso2006ArvoresDeitadas.pdf
Detailed info about the NER tagset: http://beta.visl.sdu.dk/visl/pt/info/portsymbol.html#semtags_names
Note: Do not use this class, internal use only!public class ADNameSampleStream : ObjectStreamBase<NameSample?>, IObjectStream<NameSample?>, IDisposable
- Inheritance
-
ADNameSampleStream
- Implements
- Inherited Members
Constructors
ADNameSampleStream(IInputStreamFactory, string, bool)
Creates a new NameSample stream from a Stream.
[Obsolete("Deprecated upstream.")]
public ADNameSampleStream(IInputStreamFactory @in, string charsetName, bool splitHyphenatedTokens)
Parameters
inIInputStreamFactorythe Corpus Stream
charsetNamestringthe charset of the Arvores Deitadas Corpus
splitHyphenatedTokensboolif true hyphenated tokens will be separated: "carros-monstro" > "carros" "-" "monstro"
Exceptions
- IOException
if there is an error during reading
ADNameSampleStream(IObjectStream<string?>, bool)
Creates a new NameSample stream from a line stream, i.e. IObjectStream<T> of string, that could be a PlainTextByLineStream object.
public ADNameSampleStream(IObjectStream<string?> lineStream, bool splitHyphenatedTokens)
Parameters
lineStreamIObjectStream<string>a stream of lines as string
splitHyphenatedTokensboolif true hyphenated tokens will be separated: "carros-monstro" > "carros" "-" "monstro"
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
- NotSupportedException
if the underlying stream does not support resetting