Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.nlp.trees
Class CollinsHeadFinder

    java.lang.Object
      edu.stanford.nlp.trees.AbstractCollinsHeadFinder
          edu.stanford.nlp.trees.CollinsHeadFinder

All Implemented Interfaces:
  HeadFinder, Serializable

Direct Known Subclasses:
  ModCollinsHeadFinder

    public class CollinsHeadFinder

extends AbstractCollinsHeadFinder

Implements the HeadFinder found in Michael Collins' 1999 thesis. Except: we've added a head rule for NX, which returns the leftmost item. 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? -- no Bikel, CL, 2005 says it defaults to leftmost). These rules are suitable for the Penn Treebank.

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.

Author:
  Christopher Manning
See Also:
  Serialized Form

Field Summary

Fields inherited from class edu.stanford.nlp.trees.AbstractCollinsHeadFinder
`defaultRule, nonTerminalInfo, tlp`

Constructor Summary
`CollinsHeadFinder()`
`CollinsHeadFinder(TreebankLanguagePack tlp)`

Method Summary
`static void` | `main(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 The default does nothing.

Methods inherited from class edu.stanford.nlp.trees.AbstractCollinsHeadFinder
`determineHead, determineHead, determineNonTrivialHead, findMarkedHead, traverseLocate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CollinsHeadFinder

    public CollinsHeadFinder()

### CollinsHeadFinder

    public CollinsHeadFinder(TreebankLanguagePack tlp)

Method Detail

### postOperationFix

    protected int postOperationFix(int headIdx,
                                   Tree[] daughterTrees)

  Description copied from class: `AbstractCollinsHeadFinder`
  A way for subclasses to fix any heads under special conditions The default does nothing.

  Overrides:
    `postOperationFix` in class `AbstractCollinsHeadFinder`
  Parameters:
    `headIdx` - the index of the proposed head
    `daughterTrees` - the array of daughter trees
  Returns:
    the new headIndex

### main

    public static void main(String[] args)

  Go through trees and determine their heads and print them. Just for debuggin'.
  Usage: `java edu.stanford.nlp.trees.CollinsHeadFinder treebankFilePath`

  Parameters:
    `args` - The treebankFilePath

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Stanford NLP Group