opennlp.tools.coref.mention
Class Mention

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

public class Mention
extends Object
implements Comparable<Mention>

Data structure representation of a mention.


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

Field Detail

type

protected String type
A string representing the type of this extent. This is helpful 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 String nameType
A string representing the name type for this extent.

Constructor Detail

Mention

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

Mention

public Mention(Span span,
               Span headSpan,
               int entityId,
               Parse parse,
               String extentType,
               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(Mention e)
Specified by:
compareTo in interface Comparable<Mention>

setParse

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

Parameters:
parse - The parse for this mention.

getNameType

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

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

setNameType

protected void setNameType(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 String toString()
Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.