edu.stanford.nlp.trees
Class CollinsSemanticHeadFinder
java.lang.Object
|
+--edu.stanford.nlp.trees.CollinsSemanticHeadFinder
- All Implemented Interfaces:
- HeadFinder
- public class CollinsSemanticHeadFinder
- extends Object
- implements HeadFinder
Implements the HeadFinder found in Michael Collins' 1999 thesis.
Except: we've added a head rule for NX (returns rightmost), whereas
no rule for the head of NX is found in any of the versions of
Collins' head table that we have (did he perhaps use the NP rules
for NX?
Now this version chooses the semantic head verb rather than the verb form
for cases with verbs. Should remember auxiliaries to differentiate past
and passive, though.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollinsSemanticHeadFinder
public CollinsSemanticHeadFinder()
determineHead
public Tree determineHead(Tree t)
- Determine which daughter of the current parse tree is the
head. It assumes that the daughters alread have had their
heads determined. It assumes that labels are a
CategoryWordTag
- Specified by:
determineHead
in interface HeadFinder
- Parameters:
t
- The parse tree to examine the daughters of
- Returns:
- The parse tree that is the head
isVerbalAuxiliary
public boolean isVerbalAuxiliary(Tree t)
main
public static void main(String[] args)
- Go through trees and determine their heads and print them.
Just for debuggin'
Use: java CollinsHeadFinder /wsj/07
Stanford NLP Group