com.aliasi.coref
Class CachedMention

java.lang.Object
  extended by com.aliasi.coref.CachedMention
All Implemented Interfaces:
Mention

public class CachedMention
extends Object
implements Mention

A CachedMention stores all of the retun values specified by the Mention interface.

Cached mentions are individuated by reference.

Since:
LingPipe1.0
Version:
3.1.2
Author:
Bob Carpenter

Constructor Summary
CachedMention(String phrase, String entityType, Set<String> honorifics, String[] normalTokens, String gender, boolean isPronominal)
          Construct a cached mention from the specified return values.
 
Method Summary
 String entityType()
          Returns the type of entity recognized for this mention.
 String gender()
          Returns a string representing the gender of this mention.
 Set<String> honorifics()
          Returns the set of honorifics which occur in this mention.
 boolean isPronominal()
          Returns true if this mention is a pronoun.
 String normalPhrase()
          Returns a normalized version of the phrase, defined to be the concatenation of the normal tokens by a single whitespace.
 String[] normalTokens()
          Returns an array of normalized tokens for this phrase.
 String phrase()
          Returns the original phrase underlying this mention.
 String toString()
          Returns a string-based representation of this mention.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachedMention

public CachedMention(String phrase,
                     String entityType,
                     Set<String> honorifics,
                     String[] normalTokens,
                     String gender,
                     boolean isPronominal)
Construct a cached mention from the specified return values. The normal phrase is defined to be the normal tokens concatenated with a single whitespace separator.

Parameters:
phrase - Underlying phrase for the mention.
entityType - The type of the mention.
honorifics - The honorifics for the mention.
normalTokens - The sequence of normal tokens for the mention.
gender - The gender of the mention constructed.
isPronominal - true if this mention is a pronoun.
Method Detail

phrase

public String phrase()
Returns the original phrase underlying this mention.

Specified by:
phrase in interface Mention
Returns:
Original phrase underlying this mention.

entityType

public String entityType()
Returns the type of entity recognized for this mention.

Specified by:
entityType in interface Mention
Returns:
Type of entity recognized for this mention.

honorifics

public Set<String> honorifics()
Returns the set of honorifics which occur in this mention.

Specified by:
honorifics in interface Mention
Returns:
Set of honorifics which occur in this mention.

normalPhrase

public String normalPhrase()
Returns a normalized version of the phrase, defined to be the concatenation of the normal tokens by a single whitespace.

Specified by:
normalPhrase in interface Mention
Returns:
Normalized version of the phrase.

normalTokens

public String[] normalTokens()
Returns an array of normalized tokens for this phrase.

Specified by:
normalTokens in interface Mention
Returns:
Array of normalized tokens for this phrase.

isPronominal

public boolean isPronominal()
Returns true if this mention is a pronoun.

Specified by:
isPronominal in interface Mention
Returns:
true if this mention is a pronoun.

gender

public String gender()
Returns a string representing the gender of this mention.

Specified by:
gender in interface Mention
Returns:
A string representing the gender of this mention.

toString

public String toString()
Returns a string-based representation of this mention.

Overrides:
toString in class Object
Returns:
String representation of this mention.