gate.creole.coref
Class PronominalCoref

java.lang.Object
  |
  +--gate.util.AbstractFeatureBearer
        |
        +--gate.creole.AbstractResource
              |
              +--gate.creole.AbstractProcessingResource
                    |
                    +--gate.creole.AbstractLanguageAnalyser
                          |
                          +--gate.creole.coref.PronominalCoref
All Implemented Interfaces:
ANNIEConstants, Executable, FeatureBearer, LanguageAnalyser, NameBearer, ProcessingResource, Resource, Serializable

public class PronominalCoref
extends AbstractLanguageAnalyser
implements ProcessingResource, ANNIEConstants

See Also:
Serialized Form

Inner Class Summary
private static class PronominalCoref.AnnotationOffsetComparator
          ---
private  class PronominalCoref.Quote
          ---
private  class PronominalCoref.Sentence
          ---
 
Inner classes inherited from class gate.creole.AbstractProcessingResource
AbstractProcessingResource.InternalStatusListener, AbstractProcessingResource.IntervalProgressListener
 
Field Summary
private  HashMap anaphor2antecedent
          ---
private static PronominalCoref.AnnotationOffsetComparator ANNOTATION_OFFSET_COMPARATOR
          ---
private  String annotationSetName
          ---
static String COREF_ANN_SET_PARAMETER_NAME
           
static String COREF_DOCUMENT_PARAMETER_NAME
           
private static boolean DEBUG
          ---
private  AnnotationSet defaultAnnotations
          ---
private  HashMap personGender
          ---
private static String PLEON_GRAMMAR_URL
           
private static String PLEONASTIC_TYPE
           
private  Annotation[] pleonasticIt
          ---
private  Transducer pleonTransducer
          ---
private static String PRP_CATEGORY
           
private static FeatureMap PRP_RESTRICTION
          ---
private static String PRP$_CATEGORY
           
private static String QT_GRAMMAR_URL
           
private  Transducer qtTransducer
          ---
private static String QUOTED_TEXT_TYPE
           
private  PronominalCoref.Quote[] quotedText
          ---
private static int SENTENCES_IN_SCOPE
           
private  PronominalCoref.Sentence[] textSentences
          ---
 
Fields inherited from class gate.creole.AbstractLanguageAnalyser
corpus, document
 
Fields inherited from class gate.creole.AbstractProcessingResource
interrupted, progressListeners, statusListeners
 
Fields inherited from class gate.creole.AbstractResource
name, serialVersionUID
 
Fields inherited from class gate.util.AbstractFeatureBearer
features
 
Fields inherited from interface gate.creole.ANNIEConstants
ANNOTATION_COREF_FEATURE_NAME, DATE_ANNOTATION_TYPE, DOCUMENT_COREF_FEATURE_NAME, LOCATION_ANNOTATION_TYPE, LOOKUP_ANNOTATION_TYPE, LOOKUP_MAJOR_TYPE_FEATURE_NAME, LOOKUP_MINOR_TYPE_FEATURE_NAME, MONEY_ANNOTATION_TYPE, ORGANIZATION_ANNOTATION_TYPE, PERSON_ANNOTATION_TYPE, PERSON_GENDER_FEATURE_NAME, PR_NAMES, SENTENCE_ANNOTATION_TYPE, SPACE_TOKEN_ANNOTATION_TYPE, TOKEN_ANNOTATION_TYPE, TOKEN_CATEGORY_FEATURE_NAME, TOKEN_KIND_FEATURE_NAME, TOKEN_LENGTH_FEATURE_NAME, TOKEN_ORTH_FEATURE_NAME, TOKEN_STRING_FEATURE_NAME
 
Constructor Summary
PronominalCoref()
          ---
 
Method Summary
private  Annotation _chooseAntecedent$HE$HIM$HIS$SHE$HER$HIMSELF$(Annotation ant1, Annotation ant2, Annotation pronoun)
          ---
private  Annotation _chooseAntecedent$IT$ITS$ITSELF$(Annotation ant1, Annotation ant2, Annotation pronoun)
          ---
private  Annotation _resolve$HE$HIM$HIS$HIMSELF$(Annotation pronoun, int sentenceIndex)
          ---
private  Annotation _resolve$I$ME$MY$MYSELF$(Annotation pronoun, int sentenceIndex)
          ---
private  Annotation _resolve$IT$ITS$ITSELF$(Annotation pronoun, int sentenceIndex)
          ---
private  Annotation _resolve$SHE$HER$(Annotation pronoun, int sentenceIndex)
          ---
(package private) static void ()
          ---
 void execute()
          This method runs the coreferencer.
private  Annotation findAntecedent(Annotation currPronoun, int prnSentIndex)
          ---
private  String findPersonGender(Annotation person)
          ---
 String getAnnotationSetName()
          ---
 HashMap getResolvedAnaphora()
          ---
 Resource init()
          Initialise this resource, and return it.
(package private)  boolean isPleonastic(Annotation pronoun)
           
private  void preprocess()
          ---
 void reInit()
          Reinitialises the processing resource.
 void setAnnotationSetName(String annotationSetName)
          ---
 void setDocument(Document newDocument)
          Set the document to run on.
 
Methods inherited from class gate.creole.AbstractLanguageAnalyser
getCorpus, getDocument, setCorpus
 
Methods inherited from class gate.creole.AbstractProcessingResource
addProgressListener, addStatusListener, cleanup, fireProcessFinished, fireProgressChanged, fireStatusChanged, interrupt, isInterrupted, removeProgressListener, removeStatusListener
 
Methods inherited from class gate.creole.AbstractResource
checkParameterValues, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners
 
Methods inherited from class gate.util.AbstractFeatureBearer
getFeatures, setFeatures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface gate.ProcessingResource
interrupt, isInterrupted
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Field Detail

COREF_DOCUMENT_PARAMETER_NAME

public static final String COREF_DOCUMENT_PARAMETER_NAME

COREF_ANN_SET_PARAMETER_NAME

public static final String COREF_ANN_SET_PARAMETER_NAME

DEBUG

private static final boolean DEBUG
---

QT_GRAMMAR_URL

private static final String QT_GRAMMAR_URL

PLEON_GRAMMAR_URL

private static final String PLEON_GRAMMAR_URL

QUOTED_TEXT_TYPE

private static final String QUOTED_TEXT_TYPE

PLEONASTIC_TYPE

private static final String PLEONASTIC_TYPE

PRP_CATEGORY

private static final String PRP_CATEGORY

PRP$_CATEGORY

private static final String PRP$_CATEGORY

SENTENCES_IN_SCOPE

private static final int SENTENCES_IN_SCOPE

ANNOTATION_OFFSET_COMPARATOR

private static PronominalCoref.AnnotationOffsetComparator ANNOTATION_OFFSET_COMPARATOR
---

annotationSetName

private String annotationSetName
---

qtTransducer

private Transducer qtTransducer
---

pleonTransducer

private Transducer pleonTransducer
---

defaultAnnotations

private AnnotationSet defaultAnnotations
---

textSentences

private PronominalCoref.Sentence[] textSentences
---

quotedText

private PronominalCoref.Quote[] quotedText
---

pleonasticIt

private Annotation[] pleonasticIt
---

personGender

private HashMap personGender
---

anaphor2antecedent

private HashMap anaphor2antecedent
---

PRP_RESTRICTION

private static final FeatureMap PRP_RESTRICTION
---
Constructor Detail

PronominalCoref

public PronominalCoref()
---
Method Detail

static void ()
---

init

public Resource init()
              throws ResourceInstantiationException
Initialise this resource, and return it.
Specified by:
init in interface Resource
Overrides:
init in class AbstractProcessingResource

reInit

public void reInit()
            throws ResourceInstantiationException
Reinitialises the processing resource. After calling this method the resource should be in the state it is after calling init. If the resource depends on external resources (such as rules files) then the resource will re-read those resources. If the data used to create the resource has changed since the resource has been created then the resource will change too after calling reInit().
Specified by:
reInit in interface ProcessingResource
Overrides:
reInit in class AbstractProcessingResource

setDocument

public void setDocument(Document newDocument)
Set the document to run on.
Overrides:
setDocument in class AbstractLanguageAnalyser

setAnnotationSetName

public void setAnnotationSetName(String annotationSetName)
---

getAnnotationSetName

public String getAnnotationSetName()
---

execute

public void execute()
             throws ExecutionException
This method runs the coreferencer. It assumes that all the needed parameters are set. If they are not, an exception will be fired.
Specified by:
execute in interface Executable
Overrides:
execute in class AbstractProcessingResource

getResolvedAnaphora

public HashMap getResolvedAnaphora()
---

findAntecedent

private Annotation findAntecedent(Annotation currPronoun,
                                  int prnSentIndex)
---

isPleonastic

boolean isPleonastic(Annotation pronoun)

_resolve$HE$HIM$HIS$HIMSELF$

private Annotation _resolve$HE$HIM$HIS$HIMSELF$(Annotation pronoun,
                                                int sentenceIndex)
---

_resolve$SHE$HER$

private Annotation _resolve$SHE$HER$(Annotation pronoun,
                                     int sentenceIndex)
---

_resolve$IT$ITS$ITSELF$

private Annotation _resolve$IT$ITS$ITSELF$(Annotation pronoun,
                                           int sentenceIndex)
---

_resolve$I$ME$MY$MYSELF$

private Annotation _resolve$I$ME$MY$MYSELF$(Annotation pronoun,
                                            int sentenceIndex)
---

preprocess

private void preprocess()
                 throws ExecutionException
---

findPersonGender

private String findPersonGender(Annotation person)
---

_chooseAntecedent$HE$HIM$HIS$SHE$HER$HIMSELF$

private Annotation _chooseAntecedent$HE$HIM$HIS$SHE$HER$HIMSELF$(Annotation ant1,
                                                                 Annotation ant2,
                                                                 Annotation pronoun)
---

_chooseAntecedent$IT$ITS$ITSELF$

private Annotation _chooseAntecedent$IT$ITS$ITSELF$(Annotation ant1,
                                                    Annotation ant2,
                                                    Annotation pronoun)
---