opennlp.tools.parser.treeinsert
Class ParserEventStream
java.lang.Object
opennlp.model.AbstractEventStream
opennlp.tools.util.AbstractEventStream<Parse>
opennlp.tools.parser.AbstractParserEventStream
opennlp.tools.parser.treeinsert.ParserEventStream
- All Implemented Interfaces:
- opennlp.model.EventStream
public class ParserEventStream
- extends AbstractParserEventStream
Method Summary |
protected void |
addParseEvents(List<opennlp.model.Event> parseEvents,
Parse[] chunks)
Produces all events for the specified sentence chunks
and adds them to the specified list. |
void |
init()
|
protected boolean |
lastChild(Parse child,
Parse parent)
Returns true if the specified child is the last child of the specified parent. |
static void |
main(String[] args)
|
Methods inherited from class opennlp.model.AbstractEventStream |
remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
attachContextGenerator
protected AttachContextGenerator attachContextGenerator
buildContextGenerator
protected BuildContextGenerator buildContextGenerator
checkContextGenerator
protected CheckContextGenerator checkContextGenerator
ParserEventStream
public ParserEventStream(ObjectStream<Parse> d,
HeadRules rules,
ParserEventTypeEnum etype,
Dictionary dict)
ParserEventStream
public ParserEventStream(ObjectStream<Parse> d,
HeadRules rules,
ParserEventTypeEnum etype)
init
public void init()
- Overrides:
init
in class AbstractParserEventStream
lastChild
protected boolean lastChild(Parse child,
Parse parent)
- Description copied from class:
AbstractParserEventStream
- Returns true if the specified child is the last child of the specified parent.
- Overrides:
lastChild
in class AbstractParserEventStream
- Parameters:
child
- The child parse.parent
- The parent parse.
- Returns:
- true if the specified child is the last child of the specified parent; false otherwise.
addParseEvents
protected void addParseEvents(List<opennlp.model.Event> parseEvents,
Parse[] chunks)
- Description copied from class:
AbstractParserEventStream
- Produces all events for the specified sentence chunks
and adds them to the specified list.
- Specified by:
addParseEvents
in class AbstractParserEventStream
- Parameters:
parseEvents
- A list of events to be added to.chunks
- Pre-chunked constituents of a sentence.
main
public static void main(String[] args)
throws IOException,
InvalidFormatException
- Throws:
IOException
InvalidFormatException
Copyright © 2010. All Rights Reserved.