public class SemanticHeadFinder extends ModCollinsHeadFinder
nsubj(big, Bill) cop(big, is)
This analysis is used for questions and declaratives for adjective
complements and declarative nominal complements. However Wh-sentences
with nominal complements do not receive this treatment.
"Who is the president?" is analyzed with "the president" as nsubj and "who"
as "attr" of the copula:
nsubj(is, president)
attr(is, Who)
expl(is, There) det(man-4, a-3) nsubj(is-2, man-4)defaultLeftRule, defaultRightRule, defaultRule, nonTerminalInfo, tlp| Constructor and Description |
|---|
SemanticHeadFinder() |
SemanticHeadFinder(boolean noCopulaHead) |
SemanticHeadFinder(TreebankLanguagePack tlp,
boolean noCopulaHead)
Create a SemanticHeadFinder.
|
| Modifier and Type | Method and Description |
|---|---|
protected Tree |
determineNonTrivialHead(Tree t,
Tree parent)
Determine which daughter of the current parse tree is the
head.
|
boolean |
isVerbalAuxiliary(Tree t)
Returns true if this tree is a preterminal that is a verbal auxiliary.
|
boolean |
makesCopulaHead()
Generally will be false, except for SemanticHeadFinder
|
protected int |
postOperationFix(int headIdx,
Tree[] daughterTrees)
Overwrite the postOperationFix method.
|
maindetermineHead, determineHead, findMarkedHead, traverseLocatepublic SemanticHeadFinder()
public SemanticHeadFinder(boolean noCopulaHead)
public SemanticHeadFinder(TreebankLanguagePack tlp, boolean noCopulaHead)
tlp - The TreebankLanguagePack, used by the superclass to get basic
category of constituents.noCopulaHead - If true, a copular verb (a form of be)
is not treated as head when it has an AdjP or NP complement. If false,
a copula verb is still always treated as a head. But it will still
be treated as an auxiliary in periphrastic tenses with a VP complement.public boolean makesCopulaHead()
AbstractCollinsHeadFindermakesCopulaHead in interface CopulaHeadFindermakesCopulaHead in class AbstractCollinsHeadFinderprotected int postOperationFix(int headIdx,
Tree[] daughterTrees)
postOperationFix in class CollinsHeadFinderheadIdx - The index of the proposed headdaughterTrees - The array of daughter treesprotected Tree determineNonTrivialHead(Tree t, Tree parent)
determineNonTrivialHead in class AbstractCollinsHeadFindert - The parse tree to examine the daughters of.
This is assumed to never be a leafparent - The parent of t (or may be null)public boolean isVerbalAuxiliary(Tree t)
t - A tree to examine for being an auxiliary.