com.aliasi.coref
Class EnglishMentionFactory

java.lang.Object
  extended by com.aliasi.coref.AbstractMentionFactory
      extended by com.aliasi.coref.EnglishMentionFactory
All Implemented Interfaces:
MentionFactory

public class EnglishMentionFactory
extends AbstractMentionFactory

A mention factory for English phrases. Defines genders and honorifics in lists, which are accessible to other modules.

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

Field Summary
static String FEMALE_GENDER
          The gender for females.
static Set<String> FEMALE_HONORIFICS
          The set of female honorifics.
static Set<String> HONORIFICS
          The complete set of male, female, and generic honorifics.
static String MALE_GENDER
          The gender for males.
static Set<String> MALE_HONORIFICS
          The set of male honorifics.
static String NEUTER_GENDER
          The gender for neuters.
 
Constructor Summary
EnglishMentionFactory()
          Constructs a new English mention factory.
 
Method Summary
 String gender(String entityType)
          Returns a string rerpesenting the gender entities with the specified entity type.
 boolean isHonorific(String normalizedToken)
          Returns true if the specified token is an honorific.
 boolean isPronominal(String entityType)
          Returns true if the specified entity type is a pronominal type.
 String normalizeToken(String token)
          Returns a normalized version of the specified token.
 
Methods inherited from class com.aliasi.coref.AbstractMentionFactory
create, promote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MALE_GENDER

public static final String MALE_GENDER
The gender for males.

See Also:
Constant Field Values

FEMALE_GENDER

public static final String FEMALE_GENDER
The gender for females.

See Also:
Constant Field Values

NEUTER_GENDER

public static final String NEUTER_GENDER
The gender for neuters.

See Also:
Constant Field Values

MALE_HONORIFICS

public static final Set<String> MALE_HONORIFICS
The set of male honorifics.


FEMALE_HONORIFICS

public static final Set<String> FEMALE_HONORIFICS
The set of female honorifics.


HONORIFICS

public static final Set<String> HONORIFICS
The complete set of male, female, and generic honorifics.

Constructor Detail

EnglishMentionFactory

public EnglishMentionFactory()
Constructs a new English mention factory.

Method Detail

isHonorific

public boolean isHonorific(String normalizedToken)
Description copied from class: AbstractMentionFactory
Returns true if the specified token is an honorific.

Specified by:
isHonorific in class AbstractMentionFactory
Parameters:
normalizedToken - Token to test.
Returns:
true if the specified token is an honorific.

isPronominal

public boolean isPronominal(String entityType)
Returns true if the specified entity type is a pronominal type.

Specified by:
isPronominal in class AbstractMentionFactory
Parameters:
entityType - Type of entity to test.
Returns:
true if the specified entity type is pronominal.

normalizeToken

public String normalizeToken(String token)
Returns a normalized version of the specified token. Normalization returns a lowercased version of tokens, or null if the token is entirely punctuation.

Specified by:
normalizeToken in class AbstractMentionFactory
Parameters:
token - Token to normalize.
Returns:
Normalized version of token.

gender

public String gender(String entityType)
Returns a string rerpesenting the gender entities with the specified entity type.

Specified by:
gender in class AbstractMentionFactory
Parameters:
entityType - Entity type from which to extract gender.
Returns:
Gender corresponding to the specified entity type.