opennlp.tools.coref.mention
Interface HeadFinder

All Known Implementing Classes:
PTBHeadFinder

public interface HeadFinder

Interface for finding head words in noun phrases and head noun-phrases in parses.


Method Summary
 Parse getHead(Parse parse)
          Returns the child parse which contains the lexical head of the specified parse.
 int getHeadIndex(Parse parse)
          Returns which index the specified list of token is the head word.
 Parse getHeadToken(Parse np)
          Returns head token for the specified np parse.
 Parse getLastHead(Parse p)
          Returns the parse bottom-most head of a Parse.
 

Method Detail

getHead

Parse getHead(Parse parse)
Returns the child parse which contains the lexical head of the specified parse.

Parameters:
parse - The parse in which to find the head.
Returns:
The parse containing the lexical head of the specified parse. If no head is available or the constituent has no sub-components that are eligible heads then null is returned.

getHeadIndex

int getHeadIndex(Parse parse)
Returns which index the specified list of token is the head word.

Parameters:
parse - The parse in which to find the head index.
Returns:
The index of the head token.

getLastHead

Parse getLastHead(Parse p)
Returns the parse bottom-most head of a Parse. If no head is available which is a child of p then p is returned.

Parameters:
p - Parse to find the head of.
Returns:
bottom-most head of p.

getHeadToken

Parse getHeadToken(Parse np)
Returns head token for the specified np parse.

Parameters:
np - The noun parse to get head from.
Returns:
head token parse.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.