edu.stanford.nlp.dcoref
Class CorefCluster

java.lang.Object
  extended by edu.stanford.nlp.dcoref.CorefCluster
All Implemented Interfaces:
java.io.Serializable

public class CorefCluster
extends java.lang.Object
implements java.io.Serializable

One cluster for the SieveCoreferenceSystem.

Author:
Heeyoung Lee
See Also:
Serialized Form

Field Summary
protected  java.util.Set<Dictionaries.Animacy> animacies
           
protected  int clusterID
           
protected  java.util.Set<Mention> corefMentions
           
protected  Mention firstMention
          The first mention in this cluster
protected  java.util.Set<Dictionaries.Gender> genders
           
protected  java.util.Set<java.lang.String> heads
           
protected  java.util.Set<java.lang.String> nerStrings
           
protected  java.util.Set<Dictionaries.Number> numbers
           
protected  Mention representative
          Return the most representative mention in the chain.
 java.util.Set<java.lang.String> words
          All words in this cluster - for word inclusion feature
 
Constructor Summary
CorefCluster()
           
CorefCluster(int ID)
           
CorefCluster(int ID, java.util.Set<Mention> mentions)
           
 
Method Summary
static boolean alias(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Semantics semantics, Dictionaries dict)
           
static boolean attributesAgree(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
           
static boolean bothHaveProper(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
           
static boolean exactStringMatch(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Dictionaries dict, java.util.Set<Mention> roleSet)
           
 int getClusterID()
           
 java.util.Set<Mention> getCorefMentions()
           
 Mention getFirstMention()
           
 Mention getRepresentativeMention()
           
static boolean haveIncompatibleModifier(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
          Compatible modifier only
static boolean headsAgree(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m, Mention ant, Dictionaries dict)
           
static boolean isAcronym(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
           
static boolean isApposition(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m1, Mention m2)
           
static boolean isPredicateNominatives(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m1, Mention m2)
           
static boolean isRelativePronoun(Mention m1, Mention m2)
           
static boolean isRoleAppositive(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m1, Mention m2, Dictionaries dict)
           
 boolean isSinglePronounCluster(Dictionaries dict)
           
static boolean iWithini(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Dictionaries dict)
           
static void mergeClusters(CorefCluster to, CorefCluster from)
          merge 2 clusters: to = to + from
static boolean personDisagree(Document document, CorefCluster mentionCluster, CorefCluster potentialAntecedent, Dictionaries dict)
           
 void printCorefCluster(java.util.logging.Logger logger)
          Print cluster information
static boolean relaxedExactStringMatch(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention mention, Mention ant, Dictionaries dict, java.util.Set<Mention> roleSet)
          Exact string match except phrase after head (only for proper noun): For dealing with a error like "[Mr.
static boolean relaxedHeadsAgreeBetweenMentions(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m, Mention ant)
           
static boolean sameProperHeadLastWord(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention mention, Mention ant)
           
static boolean wordsIncluded(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention mention, Mention ant)
          Word inclusion except stop words
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

corefMentions

protected java.util.Set<Mention> corefMentions

clusterID

protected int clusterID

numbers

protected java.util.Set<Dictionaries.Number> numbers

genders

protected java.util.Set<Dictionaries.Gender> genders

animacies

protected java.util.Set<Dictionaries.Animacy> animacies

nerStrings

protected java.util.Set<java.lang.String> nerStrings

heads

protected java.util.Set<java.lang.String> heads

words

public java.util.Set<java.lang.String> words
All words in this cluster - for word inclusion feature


firstMention

protected Mention firstMention
The first mention in this cluster


representative

protected Mention representative
Return the most representative mention in the chain. Proper mention and a mention with more pre-modifiers are preferred.

Constructor Detail

CorefCluster

public CorefCluster(int ID)

CorefCluster

public CorefCluster()

CorefCluster

public CorefCluster(int ID,
                    java.util.Set<Mention> mentions)
Method Detail

getClusterID

public int getClusterID()

getCorefMentions

public java.util.Set<Mention> getCorefMentions()

getFirstMention

public Mention getFirstMention()

getRepresentativeMention

public Mention getRepresentativeMention()

mergeClusters

public static void mergeClusters(CorefCluster to,
                                 CorefCluster from)
merge 2 clusters: to = to + from


personDisagree

public static boolean personDisagree(Document document,
                                     CorefCluster mentionCluster,
                                     CorefCluster potentialAntecedent,
                                     Dictionaries dict)

wordsIncluded

public static boolean wordsIncluded(CorefCluster mentionCluster,
                                    CorefCluster potentialAntecedent,
                                    Mention mention,
                                    Mention ant)
Word inclusion except stop words


haveIncompatibleModifier

public static boolean haveIncompatibleModifier(CorefCluster mentionCluster,
                                               CorefCluster potentialAntecedent)
Compatible modifier only


isRoleAppositive

public static boolean isRoleAppositive(CorefCluster mentionCluster,
                                       CorefCluster potentialAntecedent,
                                       Mention m1,
                                       Mention m2,
                                       Dictionaries dict)

isRelativePronoun

public static boolean isRelativePronoun(Mention m1,
                                        Mention m2)

isAcronym

public static boolean isAcronym(CorefCluster mentionCluster,
                                CorefCluster potentialAntecedent)

isPredicateNominatives

public static boolean isPredicateNominatives(CorefCluster mentionCluster,
                                             CorefCluster potentialAntecedent,
                                             Mention m1,
                                             Mention m2)

isApposition

public static boolean isApposition(CorefCluster mentionCluster,
                                   CorefCluster potentialAntecedent,
                                   Mention m1,
                                   Mention m2)

attributesAgree

public static boolean attributesAgree(CorefCluster mentionCluster,
                                      CorefCluster potentialAntecedent)

relaxedHeadsAgreeBetweenMentions

public static boolean relaxedHeadsAgreeBetweenMentions(CorefCluster mentionCluster,
                                                       CorefCluster potentialAntecedent,
                                                       Mention m,
                                                       Mention ant)

headsAgree

public static boolean headsAgree(CorefCluster mentionCluster,
                                 CorefCluster potentialAntecedent,
                                 Mention m,
                                 Mention ant,
                                 Dictionaries dict)

exactStringMatch

public static boolean exactStringMatch(CorefCluster mentionCluster,
                                       CorefCluster potentialAntecedent,
                                       Dictionaries dict,
                                       java.util.Set<Mention> roleSet)

relaxedExactStringMatch

public static boolean relaxedExactStringMatch(CorefCluster mentionCluster,
                                              CorefCluster potentialAntecedent,
                                              Mention mention,
                                              Mention ant,
                                              Dictionaries dict,
                                              java.util.Set<Mention> roleSet)
Exact string match except phrase after head (only for proper noun): For dealing with a error like "[Mr. Bickford] <- [Mr. Bickford , an 18-year mediation veteran]"


printCorefCluster

public void printCorefCluster(java.util.logging.Logger logger)
Print cluster information


isSinglePronounCluster

public boolean isSinglePronounCluster(Dictionaries dict)

bothHaveProper

public static boolean bothHaveProper(CorefCluster mentionCluster,
                                     CorefCluster potentialAntecedent)

sameProperHeadLastWord

public static boolean sameProperHeadLastWord(CorefCluster mentionCluster,
                                             CorefCluster potentialAntecedent,
                                             Mention mention,
                                             Mention ant)

alias

public static boolean alias(CorefCluster mentionCluster,
                            CorefCluster potentialAntecedent,
                            Semantics semantics,
                            Dictionaries dict)
                     throws java.lang.Exception
Throws:
java.lang.Exception

iWithini

public static boolean iWithini(CorefCluster mentionCluster,
                               CorefCluster potentialAntecedent,
                               Dictionaries dict)


Stanford NLP Group