Class ADChunkSampleStream
Parser for Floresta Sita(c)tica Arvores Deitadas corpus, output to for the Portuguese Chunker training.
The heuristic to extract chunks where based o paper 'A Machine Learning
Approach to Portuguese Clause Identification', (Eraldo Fernandes, Cicero
Santos and Ruy Milidiú).
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 ADChunkSampleStream : ObjectStreamBase<ChunkSample?>, IObjectStream<ChunkSample?>, IDisposable
- Inheritance
-
ADChunkSampleStream
- Implements
- Inherited Members
Constructors
ADChunkSampleStream(IInputStreamFactory, string)
public ADChunkSampleStream(IInputStreamFactory @in, string charsetName)
Parameters
inIInputStreamFactorycharsetNamestring
Exceptions
- IOException
if there is an error during reading
ADChunkSampleStream(IObjectStream<string?>)
Creates a new NameSample stream from a line stream, i.e. IObjectStream<T> of string, that could be a PlainTextByLineStream object.
public ADChunkSampleStream(IObjectStream<string?> lineStream)
Parameters
lineStreamIObjectStream<string>a stream of lines as string
Fields
Other
public const string Other = "O"
Field Value
adSentenceStream
protected readonly IObjectStream<ADSentenceStream.Sentence?> adSentenceStream
Field Value
Properties
End
public int End { set; }
Property Value
IsIncludePunctuations
protected virtual bool IsIncludePunctuations { get; }
Property Value
Start
public int Start { set; }
Property Value
Methods
ConvertFuncTag(string?, bool)
public static string? ConvertFuncTag(string? t, bool useCGTags)
Parameters
Returns
Dispose(bool)
Releases the resources from this object stream.
protected override void Dispose(bool disposing)
Parameters
disposingbool
GetChunkTag(Leaf)
protected virtual string? GetChunkTag(ADSentenceStream.SentenceParser.Leaf leaf)
Parameters
Returns
GetChunkTag(Node)
protected virtual string GetChunkTag(ADSentenceStream.SentenceParser.Node node)
Parameters
Returns
GetPhraseTagFromPosTag(string)
protected virtual string GetPhraseTagFromPosTag(string functionalTag)
Parameters
functionalTagstring
Returns
IsIntermediate(IList<string>, IList<string>, string)
protected virtual bool IsIntermediate(IList<string> tags, IList<string> target, string phraseTag)
Parameters
Returns
ProcessLeaf(Leaf, bool, string, IList<string>, IList<string>, IList<string>)
protected virtual void ProcessLeaf(ADSentenceStream.SentenceParser.Leaf leaf, bool isIntermediate, string phraseTag, IList<string> sentence, IList<string> tags, IList<string> target)
Parameters
leafADSentenceStream.SentenceParser.LeafisIntermediateboolphraseTagstringsentenceIList<string>tagsIList<string>targetIList<string>
ProcessRoot(Node?, IList<string>, IList<string>, IList<string>)
protected virtual void ProcessRoot(ADSentenceStream.SentenceParser.Node? root, IList<string> sentence, IList<string> tags, IList<string> target)
Parameters
rootADSentenceStream.SentenceParser.NodesentenceIList<string>tagsIList<string>targetIList<string>
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 ChunkSample? Read()
Returns
- ChunkSample
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