public final class PTBHeadFinder extends Object implements HeadFinder
| Modifier and Type | Method and Description |
|---|---|
Parse |
getHead(Parse p)
Returns the child parse which contains the lexical head of the specified parse.
|
int |
getHeadIndex(Parse p)
Returns which index the specified list of token is the head word.
|
Parse |
getHeadToken(Parse p)
Returns head token for the specified np parse.
|
static HeadFinder |
getInstance()
Returns an instance of this head finder.
|
Parse |
getLastHead(Parse p)
Returns the bottom-most head of a
Parse. |
public static HeadFinder getInstance()
public Parse getHead(Parse p)
HeadFindergetHead in interface HeadFinderp - The parse in which to find the head.public int getHeadIndex(Parse p)
HeadFindergetHeadIndex in interface HeadFinderp - The parse in which to find the head index.public Parse getLastHead(Parse p)
Parse. If no
head is available which is a child of p then
p is returned.getLastHead in interface HeadFinderp - Parse to find the head of.public Parse getHeadToken(Parse p)
HeadFindergetHeadToken in interface HeadFinderp - The noun parse to get head from.Copyright © 2019 The Apache Software Foundation. All rights reserved.