public class SemanticHeadFinder extends ModCollinsHeadFinder
By default the SemanticHeadFinder uses a treatment of copula where the complement of the copula is taken as the head. That is, a sentence like "Bill is big" will be analyzed as:
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)
(Such nominal copula sentences are complex: arguably, depending on the circumstances, several analyses are possible, with either the overt NP able to be any of the subject, the predicate, or one of two referential entities connected by an equational copula. These uses aren't differentiated.)
Existential sentences are treated as follows:
"There is a man"
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.
|
main
determineHead, determineHead, findMarkedHead, traverseLocate
public 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()
AbstractCollinsHeadFinder
makesCopulaHead
in interface CopulaHeadFinder
makesCopulaHead
in class AbstractCollinsHeadFinder
protected int postOperationFix(int headIdx, Tree[] daughterTrees)
postOperationFix
in class CollinsHeadFinder
headIdx
- The index of the proposed headdaughterTrees
- The array of daughter treesprotected Tree determineNonTrivialHead(Tree t, Tree parent)
determineNonTrivialHead
in class AbstractCollinsHeadFinder
t
- 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.