|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.coref.mention.PTBHeadFinder
public final class PTBHeadFinder
Finds head information from Penn Treebank style parses.
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static HeadFinder getInstance()
public Parse getHead(Parse p)
HeadFinder
getHead
in interface HeadFinder
p
- The parse in which to find the head.
public int getHeadIndex(Parse p)
HeadFinder
getHeadIndex
in interface HeadFinder
p
- 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 HeadFinder
p
- Parse to find the head of.
public Parse getHeadToken(Parse p)
HeadFinder
getHeadToken
in interface HeadFinder
p
- The noun parse to get head from.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |