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.


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.
 void setParse(Parse parse)
          Specifies the parse for this mention.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.

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 © 2013 The Apache Software Foundation. All Rights Reserved.