Class ADChunkSampleStream

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

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

in IInputStreamFactory
charsetName string

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

lineStream IObjectStream<string>

a stream of lines as string

Fields

Other

public const string Other = "O"

Field Value

string

adSentenceStream

protected readonly IObjectStream<ADSentenceStream.Sentence?> adSentenceStream

Field Value

IObjectStream<ADSentenceStream.Sentence>

Properties

End

public int End { set; }

Property Value

int

IsIncludePunctuations

protected virtual bool IsIncludePunctuations { get; }

Property Value

bool

Start

public int Start { set; }

Property Value

int

Methods

ConvertFuncTag(string?, bool)

public static string? ConvertFuncTag(string? t, bool useCGTags)

Parameters

t string
useCGTags bool

Returns

string

Dispose(bool)

Releases the resources from this object stream.

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetChunkTag(Leaf)

protected virtual string? GetChunkTag(ADSentenceStream.SentenceParser.Leaf leaf)

Parameters

leaf ADSentenceStream.SentenceParser.Leaf

Returns

string

GetChunkTag(Node)

protected virtual string GetChunkTag(ADSentenceStream.SentenceParser.Node node)

Parameters

node ADSentenceStream.SentenceParser.Node

Returns

string

GetPhraseTagFromPosTag(string)

protected virtual string GetPhraseTagFromPosTag(string functionalTag)

Parameters

functionalTag string

Returns

string

IsIntermediate(IList<string>, IList<string>, string)

protected virtual bool IsIntermediate(IList<string> tags, IList<string> target, string phraseTag)

Parameters

tags IList<string>
target IList<string>
phraseTag string

Returns

bool

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

leaf ADSentenceStream.SentenceParser.Leaf
isIntermediate bool
phraseTag string
sentence IList<string>
tags IList<string>
target IList<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

root ADSentenceStream.SentenceParser.Node
sentence IList<string>
tags IList<string>
target IList<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 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

NotSupportedException

if the underlying stream does not support resetting