opennlp.tools.coref
Class DiscourseEntity

java.lang.Object
  extended by opennlp.tools.coref.DiscourseElement
      extended by opennlp.tools.coref.DiscourseEntity

public class DiscourseEntity
extends DiscourseElement

Represents an entity in a discourse model.


Constructor Summary
DiscourseEntity(MentionContext mention)
          Creates a new entity based on the specified mention.
DiscourseEntity(MentionContext mention, GenderEnum gender, double genderProb, NumberEnum number, double numberProb)
          Creates a new entity based on the specified mention and its specified gender and number properties.
 
Method Summary
 String getCategory()
          Returns the semantic category of this entity.
 GenderEnum getGender()
          Returns the gender associated with this entity.
 double getGenderProbability()
          Returns the probability for the gender associated with this entity.
 NumberEnum getNumber()
          Returns the number associated with this entity.
 double getNumberProbability()
          Returns the probability for the number associated with this entity.
 void setCategory(String cat)
          Specifies the semantic category of this entity.
 void setGender(GenderEnum gender)
          Specifies the gender of this entity.
 void setGenderProbability(double p)
          Specifies the probability of the gender of this entity.
 void setNumber(NumberEnum number)
          Specifies the number of this entity.
 void setNumberProbability(double p)
          Specifies the probability of the number of this entity.
 
Methods inherited from class opennlp.tools.coref.DiscourseElement
addMention, getId, getLastExtent, getMentions, getNumMentions, getRecentMentions, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiscourseEntity

public DiscourseEntity(MentionContext mention,
                       GenderEnum gender,
                       double genderProb,
                       NumberEnum number,
                       double numberProb)
Creates a new entity based on the specified mention and its specified gender and number properties.

Parameters:
mention - The first mention of this entity.
gender - The gender of this entity.
genderProb - The probability that the specified gender is correct.
number - The number for this entity.
numberProb - The probability that the specified number is correct.

DiscourseEntity

public DiscourseEntity(MentionContext mention)
Creates a new entity based on the specified mention.

Parameters:
mention - The first mention of this entity.
Method Detail

getCategory

public String getCategory()
Returns the semantic category of this entity. This field is used to associated named-entity categories with an entity.

Returns:
the semantic category of this entity.

setCategory

public void setCategory(String cat)
Specifies the semantic category of this entity.

Parameters:
cat - The semantic category of the entity.

getGender

public GenderEnum getGender()
Returns the gender associated with this entity.

Returns:
the gender associated with this entity.

getGenderProbability

public double getGenderProbability()
Returns the probability for the gender associated with this entity.

Returns:
the probability for the gender associated with this entity.

getNumber

public NumberEnum getNumber()
Returns the number associated with this entity.

Returns:
the number associated with this entity.

getNumberProbability

public double getNumberProbability()
Returns the probability for the number associated with this entity.

Returns:
the probability for the number associated with this entity.

setGender

public void setGender(GenderEnum gender)
Specifies the gender of this entity.

Parameters:
gender - The gender.

setGenderProbability

public void setGenderProbability(double p)
Specifies the probability of the gender of this entity.

Parameters:
p - the probability of the gender of this entity.

setNumber

public void setNumber(NumberEnum number)
Specifies the number of this entity.

Parameters:
number -

setNumberProbability

public void setNumberProbability(double p)
Specifies the probability of the number of this entity.

Parameters:
p - the probability of the number of this entity.


Copyright © 2010. All Rights Reserved.