opennlp.tools.coref.mention
Interface Parse

All Superinterfaces:
Comparable<Parse>
All Known Implementing Classes:
AbstractParse, DefaultParse

public interface Parse
extends Comparable<Parse>

Interface for syntactic and named-entity information to be used in coreference annotation.


Method Summary
 List<Parse> getChildren()
          Returns a list of the children to this object.
 int getEntityId()
          Returns an entity id associated with this parse and coreferent parses.
 String getEntityType()
          Returns the named-entity type of this node.
 List<Parse> getNamedEntities()
          Returns a list of all the named entities contained by this parse.
 Parse getNextToken()
          Returns the next token which is not a child of this parse.
 List<Parse> getNounPhrases()
          Returns a list of the all noun phrases contained by this parse.
 Parse getParent()
          Returns the parent parse of this parse node.
 Parse getPreviousToken()
          Returns the first token which is not a child of this parse.
 int getSentenceNumber()
          Returns the index of the sentence which contains this parse.
 Span getSpan()
          Returns the character offsets of this parse node.
 List<Parse> getSyntacticChildren()
          Returns a list of the children to this object which are constituents or tokens.
 String getSyntacticType()
          Returns the syntactic type of this node.
 List<Parse> getTokens()
          Returns a list of the tokens contained by this object.
 boolean isCoordinatedNounPhrase()
          Specifies whether this parse is a coordinated noun phrase.
 boolean isNamedEntity()
          Specifies whether this parse is a named-entity.
 boolean isNounPhrase()
          Specifies whether this parse is a noun phrase.
 boolean isParentNAC()
          Determines whether this has an ancestor of type NAC.
 boolean isSentence()
          Specifies whether this parse is a sentence.
 boolean isToken()
          Specifies whether this parse is a token.
 String toString()
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getSentenceNumber

int getSentenceNumber()
Returns the index of the sentence which contains this parse.

Returns:
The index of the sentence which contains this parse.

getNounPhrases

List<Parse> getNounPhrases()
Returns a list of the all noun phrases contained by this parse. The noun phrases in this list should also implement the Parse interface.

Returns:
a list of all the noun phrases contained by this parse.

getNamedEntities

List<Parse> getNamedEntities()
Returns a list of all the named entities contained by this parse. The named entities in this list should also implement the Parse interface.

Returns:
a list of all the named entities contained by this parse.

getChildren

List<Parse> getChildren()
Returns a list of the children to this object. The children should also implement the Parse interface.

Returns:
a list of the children to this object.

getSyntacticChildren

List<Parse> getSyntacticChildren()
Returns a list of the children to this object which are constituents or tokens. The children should also implement the Parse interface. This allows implementations which contain addition nodes for things such as semantic categories to hide those nodes from the components which only care about syntactic nodes.

Returns:
a list of the children to this object which are constituents or tokens.

getTokens

List<Parse> getTokens()
Returns a list of the tokens contained by this object. The tokens in this list should also implement the Parse interface.

Returns:
the tokens

getSyntacticType

String getSyntacticType()
Returns the syntactic type of this node. Typically this is the part-of-speech or constituent labeling.

Returns:
the syntactic type.

getEntityType

String getEntityType()
Returns the named-entity type of this node.

Returns:
the named-entity type.

isParentNAC

boolean isParentNAC()
Determines whether this has an ancestor of type NAC.

Returns:
true is this has an ancestor of type NAC, false otherwise.

getParent

Parse getParent()
Returns the parent parse of this parse node.

Returns:
the parent parse of this parse node.

isNamedEntity

boolean isNamedEntity()
Specifies whether this parse is a named-entity.

Returns:
True if this parse is a named-entity; false otherwise.

isNounPhrase

boolean isNounPhrase()
Specifies whether this parse is a noun phrase.

Returns:
True if this parse is a noun phrase; false otherwise.

isSentence

boolean isSentence()
Specifies whether this parse is a sentence.

Returns:
True if this parse is a sentence; false otherwise.

isCoordinatedNounPhrase

boolean isCoordinatedNounPhrase()
Specifies whether this parse is a coordinated noun phrase.

Returns:
True if this parse is a coordinated noun phrase; false otherwise.

isToken

boolean isToken()
Specifies whether this parse is a token.

Returns:
True if this parse is a token; false otherwise.

toString

String toString()
Overrides:
toString in class Object

getEntityId

int getEntityId()
Returns an entity id associated with this parse and coreferent parses. This is only used for training on already annotated coreference annotation.

Returns:
an entity id associated with this parse and coreferent parses.

getSpan

Span getSpan()
Returns the character offsets of this parse node.

Returns:
The span representing the character offsets of this parse node.

getPreviousToken

Parse getPreviousToken()
Returns the first token which is not a child of this parse. If the first token of a sentence is a child of this parse then null is returned.

Returns:
the first token which is not a child of this parse or null if no such token exists.

getNextToken

Parse getNextToken()
Returns the next token which is not a child of this parse. If the last token of a sentence is a child of this parse then null is returned.

Returns:
the next token which is not a child of this parse or null if no such token exists.


Copyright © 2010. All Rights Reserved.