opennlp.tools.parser.treeinsert
Class ParserEventStream

java.lang.Object
  extended by opennlp.model.AbstractEventStream
      extended by opennlp.tools.util.AbstractEventStream<Parse>
          extended by opennlp.tools.parser.AbstractParserEventStream
              extended by opennlp.tools.parser.treeinsert.ParserEventStream
All Implemented Interfaces:
opennlp.model.EventStream

public class ParserEventStream
extends AbstractParserEventStream


Field Summary
protected  AttachContextGenerator attachContextGenerator
           
protected  BuildContextGenerator buildContextGenerator
           
protected  CheckContextGenerator checkContextGenerator
           
 
Fields inherited from class opennlp.tools.parser.AbstractParserEventStream
dict, etype, fixPossesives, punctSet, rules
 
Constructor Summary
ParserEventStream(ObjectStream<Parse> d, HeadRules rules, ParserEventTypeEnum etype)
           
ParserEventStream(ObjectStream<Parse> d, HeadRules rules, ParserEventTypeEnum etype, Dictionary dict)
           
 
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.tools.parser.AbstractParserEventStream
createEvents, getInitialChunks
 
Methods inherited from class opennlp.tools.util.AbstractEventStream
hasNext, next
 
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
 

Field Detail

attachContextGenerator

protected AttachContextGenerator attachContextGenerator

buildContextGenerator

protected BuildContextGenerator buildContextGenerator

checkContextGenerator

protected CheckContextGenerator checkContextGenerator
Constructor Detail

ParserEventStream

public ParserEventStream(ObjectStream<Parse> d,
                         HeadRules rules,
                         ParserEventTypeEnum etype,
                         Dictionary dict)

ParserEventStream

public ParserEventStream(ObjectStream<Parse> d,
                         HeadRules rules,
                         ParserEventTypeEnum etype)
Method Detail

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.