edu.stanford.nlp.trees.international.negra
Class OldNegraHeadFinder

java.lang.Object
  extended by edu.stanford.nlp.trees.international.negra.OldNegraHeadFinder
All Implemented Interfaces:
HeadFinder, Serializable

public class OldNegraHeadFinder
extends Object
implements HeadFinder

HeadFinder for the Negra Treebank. Adapted from CollinsHeadFinder.

Author:
Roger Levy
See Also:
Serialized Form

Constructor Summary
OldNegraHeadFinder()
           
OldNegraHeadFinder(TreebankLanguagePack tlp)
           
 
Method Summary
 Tree determineHead(Tree t)
          Determine which daughter of the current parse tree is the head.
 Tree determineHead(Tree t, Tree parent)
          Determine which daughter of the current parse tree is the head given the parent of the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldNegraHeadFinder

public OldNegraHeadFinder()

OldNegraHeadFinder

public OldNegraHeadFinder(TreebankLanguagePack tlp)
Method Detail

determineHead

public Tree determineHead(Tree t)
Determine which daughter of the current parse tree is the head. It assumes that the daughters already have had their heads determined. Another method has to do the tree walking.

Specified by:
determineHead in interface HeadFinder
Parameters:
t - The parse tree to examine the da ughters of
Returns:
The parse tree that is the head

determineHead

public Tree determineHead(Tree t,
                          Tree parent)
Description copied from interface: HeadFinder
Determine which daughter of the current parse tree is the head given the parent of the tree. It assumes that the daughters already have had their heads determined. Another method has to do the tree walking.

Specified by:
determineHead in interface HeadFinder
Parameters:
t - The parse tree to examine the daughters of
parent - The parent of tree t
Returns:
The parse tree that is the head. The convention has been that this returns null if no head is found. But maybe it should throw an exception?


Stanford NLP Group