opennlp.tools.coref.mention
Class Mention

java.lang.Object
  extended by opennlp.tools.coref.mention.Mention
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
Context

public class Mention
extends java.lang.Object
implements java.lang.Comparable

Data strucure representation of a mention.


Field Summary
protected  java.lang.String nameType
          A string representing the name type for this extent.
protected  Parse parse
          The parse node that this extent is based on.
protected  java.lang.String type
          A string representing the type of this extent.
 
Constructor Summary
Mention(Mention mention)
           
Mention(Span span, Span headSpan, int entityId, Parse parse, java.lang.String extentType)
           
Mention(Span span, Span headSpan, int entityId, Parse parse, java.lang.String extentType, java.lang.String nameType)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 Span getHeadSpan()
          Returns the character offsets for the head of this extent.
 int getId()
          Returns the id associated with this mention.
 java.lang.String getNameType()
          Returns the named-entity category associated with this mention.
 Parse getParse()
          Returns the parse node that this extent is based on.
 Span getSpan()
          Returns the character offsets for this extent.
 void setId(int i)
          Associates an id with this mention.
protected  void setNameType(java.lang.String nameType)
          Specifies the named-entity category associated with this mention.
 void setParse(Parse parse)
          Specifies the parse for this mention.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected java.lang.String type
A string representing the type of this extent. This is helpfull for determining which piece of code created a particular extent.


parse

protected Parse parse
The parse node that this extent is based on.


nameType

protected java.lang.String nameType
A string representing the name type for this extent.

Constructor Detail

Mention

public Mention(Span span,
               Span headSpan,
               int entityId,
               Parse parse,
               java.lang.String extentType)

Mention

public Mention(Span span,
               Span headSpan,
               int entityId,
               Parse parse,
               java.lang.String extentType,
               java.lang.String nameType)

Mention

public Mention(Mention mention)
Method Detail

getSpan

public Span getSpan()
Returns the character offsets for this extent.

Returns:
The span representing the character offsets of this extent.

getHeadSpan

public Span getHeadSpan()
Returns the character offsets for the head of this extent.

Returns:
The span representing the character offsets for the head of this extent.

getParse

public Parse getParse()
Returns the parse node that this extent is based on.

Returns:
The parse node that this extent is based on or null if the extent is newly created.

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

setParse

public void setParse(Parse parse)
Specifies the parse for this mention.

Parameters:
parse - The parse for this mention.

getNameType

public java.lang.String getNameType()
Returns the named-entity category associated with this mention.

Returns:
the named-entity category associated with this mention.

setNameType

protected void setNameType(java.lang.String nameType)
Specifies the named-entity category associated with this mention.

Parameters:
nameType - the named-entity category associated with this mention.

setId

public void setId(int i)
Associates an id with this mention.

Parameters:
i - The id for this mention.

getId

public int getId()
Returns the id associated with this mention.

Returns:
the id associated with this mention.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2008 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.