Class ParserEventStream
Wrapper class for one of four parser event streams. The particular event stream is specified at construction.
public class ParserEventStream : AbstractParserEventStream, IObjectStream<Event?>, IDisposable
- Inheritance
-
ParserEventStream
- Implements
- Inherited Members
Constructors
ParserEventStream(IObjectStream<Parse?>, IHeadRules, ParserEventTypeEnum, Dictionary?)
Create an event stream based on the specified data stream of the specified type using the specified head rules.
public ParserEventStream(IObjectStream<Parse?> d, IHeadRules rules, ParserEventTypeEnum etype, Dictionary? dict = null)
Parameters
dIObjectStream<Parse>A 1-parse-per-line Penn Treebank Style parse.
rulesIHeadRulesThe head rules.
etypeParserEventTypeEnumThe type of events desired (tag, chunk, build, or check).
dictDictionaryA tri-gram dictionary to reduce feature generation.
Fields
bcg
protected BuildContextGenerator bcg
Field Value
kcg
protected CheckContextGenerator kcg
Field Value
Methods
AddParseEvents(IList<Event>, Parse[])
Adds events for parsing (post tagging and chunking to the specified list of events for the specified parse chunks.
protected override void AddParseEvents(IList<Event> parseEvents, Parse[] chunks)
Parameters
parseEventsIList<Event>The events for the specified chunks.
chunksParse[]The incomplete parses to be parsed.
FirstChild(Parse, Parse)
Returns true if the specified child is the first child of the specified parent.
protected virtual bool FirstChild(Parse child, Parse parent)
Parameters
Returns
- bool
true if the specified child is the first child of the specified parent; false otherwise.
Init()
protected override void Init()
ReduceChunks(Parse[], int, Parse)
public static Parse[] ReduceChunks(Parse[] chunks, int ci, Parse parent)
Parameters
Returns
- Parse[]