edu.stanford.nlp.ie.machinereading.common
Class NoPunctuationHeadFinder

java.lang.Object
  extended by edu.stanford.nlp.trees.AbstractCollinsHeadFinder
      extended by edu.stanford.nlp.trees.CollinsHeadFinder
          extended by edu.stanford.nlp.trees.ModCollinsHeadFinder
              extended by edu.stanford.nlp.ie.machinereading.common.NoPunctuationHeadFinder
All Implemented Interfaces:
HeadFinder, java.io.Serializable

public class NoPunctuationHeadFinder
extends ModCollinsHeadFinder

Simple variant of the ModCollinsHeadFinder avoids supplying punctuation tags as heads whenever possible.

Author:
David McClosky (mcclosky@stanford.edu)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.stanford.nlp.trees.AbstractCollinsHeadFinder
defaultRule, nonTerminalInfo, tlp
 
Constructor Summary
NoPunctuationHeadFinder()
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  int postOperationFix(int headIdx, Tree[] daughterTrees)
          A way for subclasses to fix any heads under special conditions The default does nothing.
 
Methods inherited from class edu.stanford.nlp.trees.AbstractCollinsHeadFinder
determineHead, determineHead, determineNonTrivialHead, findMarkedHead, setCategoriesToAvoid, traverseLocate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoPunctuationHeadFinder

public NoPunctuationHeadFinder()
Method Detail

postOperationFix

protected int postOperationFix(int headIdx,
                               Tree[] daughterTrees)
Description copied from class: AbstractCollinsHeadFinder
A way for subclasses to fix any heads under special conditions The default does nothing.

Overrides:
postOperationFix in class CollinsHeadFinder
Parameters:
headIdx - the index of the proposed head
daughterTrees - the array of daughter trees
Returns:
the new headIndex

main

public static void main(java.lang.String[] args)


Stanford NLP Group