public abstract class AbstractParserEventStream extends AbstractEventStream<Parse>
| Modifier and Type | Field and Description |
|---|---|
protected Dictionary |
dict |
protected ParserEventTypeEnum |
etype
The type of events being generated by this event stream.
|
protected boolean |
fixPossesives |
protected Set<String> |
punctSet |
protected HeadRules |
rules |
| Constructor and Description |
|---|
AbstractParserEventStream(ObjectStream<Parse> d,
HeadRules rules,
ParserEventTypeEnum etype) |
AbstractParserEventStream(ObjectStream<Parse> d,
HeadRules rules,
ParserEventTypeEnum etype,
Dictionary dict) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addParseEvents(List<Event> newEvents,
Parse[] chunks)
Produces all events for the specified sentence chunks
and adds them to the specified list.
|
protected Iterator<Event> |
createEvents(Parse sample)
Creates events for the provided sample.
|
static Parse[] |
getInitialChunks(Parse p) |
protected void |
init() |
protected boolean |
lastChild(Parse child,
Parse parent)
Returns true if the specified child is the last child of the specified parent.
|
hasNext, nextremoveprotected HeadRules rules
protected ParserEventTypeEnum etype
protected boolean fixPossesives
protected Dictionary dict
public AbstractParserEventStream(ObjectStream<Parse> d, HeadRules rules, ParserEventTypeEnum etype, Dictionary dict)
public AbstractParserEventStream(ObjectStream<Parse> d, HeadRules rules, ParserEventTypeEnum etype)
protected Iterator<Event> createEvents(Parse sample)
AbstractEventStreamcreateEvents in class AbstractEventStream<Parse>sample - the sample for which training Events
are be created.Iterator of training events or
an empty Iterator.protected void init()
protected abstract void addParseEvents(List<Event> newEvents, Parse[] chunks)
newEvents - A list of events to be added to.chunks - Pre-chunked constituents of a sentence.protected boolean lastChild(Parse child, Parse parent)
child - The child parse.parent - The parent parse.Copyright © 2016 The Apache Software Foundation. All rights reserved.