edu.stanford.nlp.trees.international.pennchinese
Class OldChineseHeadFinder
java.lang.Object
edu.stanford.nlp.trees.international.pennchinese.OldChineseHeadFinder
- All Implemented Interfaces:
- HeadFinder, Serializable
public class OldChineseHeadFinder
- extends Object
- implements HeadFinder
HeadFinder for the Penn Chinese Treebank. Adapted from
CollinsHeadFinder.
- Author:
- Roger Levy
- See Also:
- Serialized Form
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 |
OldChineseHeadFinder
public OldChineseHeadFinder()
OldChineseHeadFinder
public OldChineseHeadFinder(TreebankLanguagePack tlp)
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 daughters 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 ofparent
- 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