uk.ac.essex.malexa.nlp.dp.GuiTAR
Class PersonalPronoun.PotentialAntecedent

java.lang.Object
  extended byuk.ac.essex.malexa.nlp.dp.GuiTAR.PersonalPronoun.PotentialAntecedent
All Implemented Interfaces:
Comparable
Enclosing class:
PersonalPronoun

class PersonalPronoun.PotentialAntecedent
extends Object
implements Comparable

An internal class to store the antecedent preferences ("indicators") and to provide the sorting functionality for the potential antecedents.(Note: here I have placed and adapted code from class NounGroup from my MSc project, so in some way NounGroup maps to this class)


Field Summary
private  int[] antecedentIndicators
          The array of antecedent indicators
static int COLLOCATION_PATTERN
          Index of the antecedent indicator of that name
static int DEFINITENESS
          Index of the antecedent indicator of that name
private  DiscourseModel dModel
          The Discourse Model
static int GIVENNESS
          Index of the antecedent indicator of that name
static int IMMEDIATE_REFERENCE
          Index of the antecedent indicator of that name
static int INDICATING_VERBS
          Index of the antecedent indicator of that name
static int LEXICAL_REITERATION
          Index of the antecedent indicator of that name
private  NominalGroup ne
          The original Cf from which this object was created
static int NON_PREPOSITIONAL_NP
          Index of the antecedent indicator of that name
static int NUMBER_OF_INDICATORS
          Number of antecedent indicators
(package private)  Utterance parentUtterance
          Pointer to the parent utterance of this potential antecedent
static int POSSIBLE_CRITERIA
          Number of possible criteria for sorting potential antecedents
static int REFERENTIAL_DISTANCE
          Index of the antecedent indicator of that name
private  int score
          The aggregate score of this antecedent (sum of all indicators)
static int SCORE
          Index of the aggregate score (sum of antecedent indicators)
static int SECTION_HEADING_PREFERENCE
          Index of the antecedent indicator of that name
private  int sortCriterion
          The criterion to be used for sorting the antecedents
static int TERM_PREFERENCE
          Index of the antecedent indicator of that name
 
Constructor Summary
PersonalPronoun.PotentialAntecedent(NominalGroup theNE, DiscourseModel dm, int theCriterion, Utterance utt)
          Creates an instance of PotentialAntecedent and sets the antecedent indicators.
 
Method Summary
 int compareTo(Object obj)
          Override the compareTo method to achieve a desired natural order of the elements of this class.
 NominalGroup getCorrespondingNE()
          Returns the ne corresponding to this PotentialAntecedent instance.
private  String getPreposition()
          Find the preceeding word of this PotentialAntecedent, and if it is a preposition return it, otherwise return null.
 int getScore(int criterion)
          Returns the current aggregate score of this potential antecedent or the value of a specific indicator.
private  int getTimesMentioned()
          Counts the number of times this PotentialAntecedent was mentioned in the previous sentences.
private  void setCollocationPattern(String anteLeftCollocate, String anteRightCollocate)
          Sets the indicator for "collocation pattern".
 void setCriterion(int criterion)
          Sets the sorting criterion of this Potential Antecedent.
private  void setDefiniteness()
           
private  void setDynamicAntecedentIndicators(String anteLeftCollocate, String anteRightCollocate)
          Dynamic Antecedent Indicators (dependent on anaphor's context)
private  void setFixedAntecedentIndicators(String anteLeftCollocate, String preposition, int timesMentioned)
          Fixed Antecedent Indicators (do not dependent on anaphor's context)
private  void setGivenness(String anteLeftCollocate, String preceedingPreposition)
           
private  void setImmediateReference()
          Sets the indicator for "immediate reference".
private  void setIndicatingVerbs(String anteLeftCollocate)
          Sets the indicator for "indicating verbs".
private  void setLexicalReiteration(int timesMentioned)
          Sets the indicator for "lexical reiteration".
private  void setNon_prepositionalNP(String preceedingPreposition)
           
private  void setReferentialDistance()
          Sets the indicator for "referential distance".
private  void setSectionHeadingPreference()
          Sets the indicator for "section heading preference".
private  void setTermPreference()
          Sets the indicator for "term preference".
 void updateScore()
          Sums antecedent indicators up to obtain the aggregate score.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFINITENESS

public static final int DEFINITENESS
Index of the antecedent indicator of that name

See Also:
Constant Field Values

GIVENNESS

public static final int GIVENNESS
Index of the antecedent indicator of that name

See Also:
Constant Field Values

INDICATING_VERBS

public static final int INDICATING_VERBS
Index of the antecedent indicator of that name

See Also:
Constant Field Values

LEXICAL_REITERATION

public static final int LEXICAL_REITERATION
Index of the antecedent indicator of that name

See Also:
Constant Field Values

SECTION_HEADING_PREFERENCE

public static final int SECTION_HEADING_PREFERENCE
Index of the antecedent indicator of that name

See Also:
Constant Field Values

NON_PREPOSITIONAL_NP

public static final int NON_PREPOSITIONAL_NP
Index of the antecedent indicator of that name

See Also:
Constant Field Values

COLLOCATION_PATTERN

public static final int COLLOCATION_PATTERN
Index of the antecedent indicator of that name

See Also:
Constant Field Values

IMMEDIATE_REFERENCE

public static final int IMMEDIATE_REFERENCE
Index of the antecedent indicator of that name

See Also:
Constant Field Values

REFERENTIAL_DISTANCE

public static final int REFERENTIAL_DISTANCE
Index of the antecedent indicator of that name

See Also:
Constant Field Values

TERM_PREFERENCE

public static final int TERM_PREFERENCE
Index of the antecedent indicator of that name

See Also:
Constant Field Values

NUMBER_OF_INDICATORS

public static final int NUMBER_OF_INDICATORS
Number of antecedent indicators

See Also:
Constant Field Values

SCORE

public static final int SCORE
Index of the aggregate score (sum of antecedent indicators)

See Also:
Constant Field Values

POSSIBLE_CRITERIA

public static final int POSSIBLE_CRITERIA
Number of possible criteria for sorting potential antecedents

See Also:
Constant Field Values

score

private int score
The aggregate score of this antecedent (sum of all indicators)


sortCriterion

private int sortCriterion
The criterion to be used for sorting the antecedents


ne

private NominalGroup ne
The original Cf from which this object was created


antecedentIndicators

private int[] antecedentIndicators
The array of antecedent indicators


dModel

private DiscourseModel dModel
The Discourse Model


parentUtterance

Utterance parentUtterance
Pointer to the parent utterance of this potential antecedent

Constructor Detail

PersonalPronoun.PotentialAntecedent

public PersonalPronoun.PotentialAntecedent(NominalGroup theNE,
                                           DiscourseModel dm,
                                           int theCriterion,
                                           Utterance utt)
Creates an instance of PotentialAntecedent and sets the antecedent indicators.

Parameters:
theNE - The original ne, which will be instantiated as a PotentialAntecedent
dm - The Discourse Model
theCriterion - The sorting criterion
Method Detail

getCorrespondingNE

public NominalGroup getCorrespondingNE()
Returns the ne corresponding to this PotentialAntecedent instance.

Returns:
NominalGroup the corresponding NE.

setCriterion

public void setCriterion(int criterion)
Sets the sorting criterion of this Potential Antecedent.

Parameters:
criterion - The sorting criterion

updateScore

public void updateScore()
Sums antecedent indicators up to obtain the aggregate score.


getScore

public int getScore(int criterion)
Returns the current aggregate score of this potential antecedent or the value of a specific indicator.

Parameters:
criterion - Specifies what score to be returned
Returns:
int The aggregate score or value of specific indicator

compareTo

public int compareTo(Object obj)
Override the compareTo method to achieve a desired natural order of the elements of this class. The desired order is controlled by the instance variable sortCriterion and is either of the following: aggregate score, immediate reference, collocational pattern, indicating verbs and referential distance (see Mitkov's paper for details).

Specified by:
compareTo in interface Comparable

setFixedAntecedentIndicators

private void setFixedAntecedentIndicators(String anteLeftCollocate,
                                          String preposition,
                                          int timesMentioned)
Fixed Antecedent Indicators (do not dependent on anaphor's context)


setDefiniteness

private void setDefiniteness()

setGivenness

private void setGivenness(String anteLeftCollocate,
                          String preceedingPreposition)

setIndicatingVerbs

private void setIndicatingVerbs(String anteLeftCollocate)
Sets the indicator for "indicating verbs". If the verb to the left of this NP is a member of a predefined set of verbs (see VERB_LIST[]).

Parameters:
anteLeftCollocate - The first verb to the left of this potential antecedent

setSectionHeadingPreference

private void setSectionHeadingPreference()
Sets the indicator for "section heading preference". If the NP occurs in the heading of a section (in our corpus title tag).


setNon_prepositionalNP

private void setNon_prepositionalNP(String preceedingPreposition)

setLexicalReiteration

private void setLexicalReiteration(int timesMentioned)
Sets the indicator for "lexical reiteration". The salience of a referent that was accessed (refered to) more than once is boosted.

Parameters:
timesMentioned - The number of mentions of the entity, to which this antecedent refers to

setTermPreference

private void setTermPreference()
Sets the indicator for "term preference". NPs representing terms in the field (technical terminology) are preferred, but for the moment no implementation is available.


getTimesMentioned

private int getTimesMentioned()
Counts the number of times this PotentialAntecedent was mentioned in the previous sentences. A fixed window of sentences is used to limit the search.

Returns:
int Number of lexical reiterations

getPreposition

private String getPreposition()
Find the preceeding word of this PotentialAntecedent, and if it is a preposition return it, otherwise return null.

Returns:
String The preceeding preposition, if no such, null

setDynamicAntecedentIndicators

private void setDynamicAntecedentIndicators(String anteLeftCollocate,
                                            String anteRightCollocate)
Dynamic Antecedent Indicators (dependent on anaphor's context)


setCollocationPattern

private void setCollocationPattern(String anteLeftCollocate,
                                   String anteRightCollocate)
Sets the indicator for "collocation pattern". If the NP occurs in the same collocational pattern. Receives as parameters the verb to the left and to the right of this antecedent (if any), and compares them with the verb to the left and right (if any) of the anaphor, which are stored as instance variables of PersonalPronoun.

Parameters:
anteLeftCollocate - The verb to the left of this antecedent

setImmediateReference

private void setImmediateReference()
Sets the indicator for "immediate reference". This indicator deals with constructions of the form (You)V1NP...conjV2it conj..., but for the moment no implementation is available.


setReferentialDistance

private void setReferentialDistance()
Sets the indicator for "referential distance". This is the recency preference. If the potential antecedent is within the same utterance of the anaphor it scores 2, previous utterance scores 1, one before that 0, and further back -1.