edu.stanford.nlp.trees.international.negra
Class NegraHeadFinder
java.lang.Object
edu.stanford.nlp.trees.AbstractCollinsHeadFinder
edu.stanford.nlp.trees.international.negra.NegraHeadFinder
- All Implemented Interfaces:
- HeadFinder, Serializable
public class NegraHeadFinder
- extends AbstractCollinsHeadFinder
HeadFinder for the Negra Treebank. Adapted from
CollinsHeadFinder.
- Author:
- Roger Levy
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NegraHeadFinder
public NegraHeadFinder()
NegraHeadFinder
public NegraHeadFinder(TreebankLanguagePack tlp)
negraSemanticHeadFinder
public static HeadFinder negraSemanticHeadFinder()
- Vends a "semantic" NegraHeadFinder---one that disprefers modal/auxiliary verbs as the heads of S or VP.
- Returns:
- a NegraHeadFinder that uses a "semantic" head-finding rule for the S category.
findMarkedHead
protected Tree findMarkedHead(Tree[] kids)
basicCategory
public String basicCategory(String category)
isLabelAnnotationIntroducingCharacter
public boolean isLabelAnnotationIntroducingCharacter(char ch)
- Say whether this character is an annotation introducing
character.
- Parameters:
ch
- The character to check
- Returns:
- Whether it is an annotation introducing character
determineNonTrivialHead
protected Tree determineNonTrivialHead(Tree t,
Tree parent)
- Called by determineHead and may be overridden in subclasses
if special treatment is necessary for particular categories.
- Overrides:
determineNonTrivialHead
in class AbstractCollinsHeadFinder
Stanford NLP Group