public class CollinsHeadFinder extends AbstractCollinsHeadFinder
May 2004: Added support for AUX and AUXG to the VP rules; these cause no interference in Penn Treebank parsing, but means that these rules also work for the BLLIP corpus (or Charniak parser output in general). Feb 2005: Fixes to coordination reheading so that punctuation cannot become head.
defaultLeftRule, defaultRightRule, defaultRule, nonTerminalInfo, tlp
Constructor and Description |
---|
CollinsHeadFinder() |
CollinsHeadFinder(TreebankLanguagePack tlp)
This constructor provides the traditional behavior, where there is
no special avoidance of punctuation categories.
|
CollinsHeadFinder(TreebankLanguagePack tlp,
java.lang.String... categoriesToAvoid) |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Go through trees and determine their heads and print them.
|
protected int |
postOperationFix(int headIdx,
Tree[] daughterTrees)
A way for subclasses to fix any heads under special conditions.
|
determineHead, determineHead, determineNonTrivialHead, findMarkedHead, makesCopulaHead, traverseLocate
public CollinsHeadFinder()
public CollinsHeadFinder(TreebankLanguagePack tlp)
tlp
- TreebankLanguagePack used for basic category functionpublic CollinsHeadFinder(TreebankLanguagePack tlp, java.lang.String... categoriesToAvoid)
protected int postOperationFix(int headIdx, Tree[] daughterTrees)
AbstractCollinsHeadFinder
postOperationFix
in class AbstractCollinsHeadFinder
headIdx
- The index of the proposed headdaughterTrees
- The array of daughter treespublic static void main(java.lang.String[] args)
java edu.stanford.nlp.trees.CollinsHeadFinder treebankFilePath
args
- The treebankFilePath