edu.stanford.nlp.dcoref
Class Rules

java.lang.Object
  extended by edu.stanford.nlp.dcoref.Rules

public class Rules
extends java.lang.Object

Rules for coref system (mention detection, entity coref, event coref) The name of the method for mention detection starts with detection, for entity coref starts with entity, and for event coref starts with event.

Author:
heeyoung, recasens

Field Summary
static java.util.regex.Pattern WHITESPACE_PATTERN
           
 
Constructor Summary
Rules()
           
 
Method Summary
static boolean contextIncompatible(Mention men, Mention ant, Dictionaries dict)
           
static boolean entityAlias(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Semantics semantics, Dictionaries dict)
           
static boolean entityAttributesAgree(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
           
static boolean entityBothHaveProper(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
           
static boolean entityClusterAllCorefDictionary(CorefCluster menCluster, CorefCluster antCluster, Dictionaries dict, int dictColumn, int freq)
           
static boolean entityCorefDictionary(Mention men, Mention ant, Dictionaries dict, int dictVersion, int freq)
           
static boolean entityExactStringMatch(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Dictionaries dict, java.util.Set<Mention> roleSet)
           
static boolean entityHaveDifferentLocation(Mention m, Mention a, Dictionaries dict)
          Check whether two mentions have different locations
static boolean entityHaveExtraProperNoun(Mention m, Mention a, java.util.Set<java.lang.String> exceptWords)
          Have extra proper noun except strings involved in semantic match
static boolean entityHaveIncompatibleModifier(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
          Compatible modifier only
static boolean entityHaveIncompatibleModifier(Mention m, Mention ant)
          Check whether later mention has incompatible modifier
static boolean entityHeadsAgree(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m, Mention ant, Dictionaries dict)
           
static boolean entityIsAcronym(CorefCluster mentionCluster, CorefCluster potentialAntecedent)
           
static boolean entityIsApposition(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m1, Mention m2)
           
static boolean entityIsPredicateNominatives(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m1, Mention m2)
           
static boolean entityIsRelativePronoun(Mention m1, Mention m2)
           
static boolean entityIsRoleAppositive(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m1, Mention m2, Dictionaries dict)
           
static boolean entityIsSpeaker(Document document, Mention mention, Mention ant, Dictionaries dict)
           
static boolean entityIWithinI(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Dictionaries dict)
           
static boolean entityIWithinI(Mention m1, Mention m2, Dictionaries dict)
          Check whether two mentions are in i-within-i relation (Chomsky, 1981)
static boolean entityNumberInLaterMention(Mention mention, Mention ant)
          Check whether there is a new number in later mention
static boolean entityPersonDisagree(Document document, CorefCluster mentionCluster, CorefCluster potentialAntecedent, Dictionaries dict)
           
static boolean entityPersonDisagree(Document document, Mention m, Mention ant, Dictionaries dict)
           
static boolean entityRelaxedExactStringMatch(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 entityRelaxedHeadsAgreeBetweenMentions(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention m, Mention ant)
           
static boolean entitySameProperHeadLastWord(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention mention, Mention ant)
           
static boolean entitySameProperHeadLastWord(Mention m, Mention a)
          Check whether two mentions have the same proper head words
static boolean entitySameSpeaker(Document document, Mention m, Mention ant)
           
static boolean entitySubjectObject(Mention m1, Mention m2)
           
static boolean entityTokenDistance(Mention m1, Mention m2)
           
static boolean entityWordsIncluded(CorefCluster mentionCluster, CorefCluster potentialAntecedent, Mention mention, Mention ant)
          Word inclusion except stop words
static boolean isAcronym(java.util.List<CoreLabel> first, java.util.List<CoreLabel> second)
           
static boolean mentionMatchesSpeakerAnnotation(Mention mention, Mention ant)
           
static boolean sentenceContextIncompatible(Mention men, Mention ant, Dictionaries dict)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHITESPACE_PATTERN

public static final java.util.regex.Pattern WHITESPACE_PATTERN
Constructor Detail

Rules

public Rules()
Method Detail

entityBothHaveProper

public static boolean entityBothHaveProper(CorefCluster mentionCluster,
                                           CorefCluster potentialAntecedent)

entitySameProperHeadLastWord

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

entityAlias

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

entityIWithinI

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

entityPersonDisagree

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

entityWordsIncluded

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


entityHaveIncompatibleModifier

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


entityIsRoleAppositive

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

entityIsRelativePronoun

public static boolean entityIsRelativePronoun(Mention m1,
                                              Mention m2)

entityIsAcronym

public static boolean entityIsAcronym(CorefCluster mentionCluster,
                                      CorefCluster potentialAntecedent)

isAcronym

public static boolean isAcronym(java.util.List<CoreLabel> first,
                                java.util.List<CoreLabel> second)

entityIsPredicateNominatives

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

entityIsApposition

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

entityAttributesAgree

public static boolean entityAttributesAgree(CorefCluster mentionCluster,
                                            CorefCluster potentialAntecedent)

entityRelaxedHeadsAgreeBetweenMentions

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

entityHeadsAgree

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

entityExactStringMatch

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

entityRelaxedExactStringMatch

public static boolean entityRelaxedExactStringMatch(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]"


entityIWithinI

public static boolean entityIWithinI(Mention m1,
                                     Mention m2,
                                     Dictionaries dict)
Check whether two mentions are in i-within-i relation (Chomsky, 1981)


entityHaveIncompatibleModifier

public static boolean entityHaveIncompatibleModifier(Mention m,
                                                     Mention ant)
Check whether later mention has incompatible modifier


entityHaveDifferentLocation

public static boolean entityHaveDifferentLocation(Mention m,
                                                  Mention a,
                                                  Dictionaries dict)
Check whether two mentions have different locations


entitySameProperHeadLastWord

public static boolean entitySameProperHeadLastWord(Mention m,
                                                   Mention a)
Check whether two mentions have the same proper head words


entityNumberInLaterMention

public static boolean entityNumberInLaterMention(Mention mention,
                                                 Mention ant)
Check whether there is a new number in later mention


entityHaveExtraProperNoun

public static boolean entityHaveExtraProperNoun(Mention m,
                                                Mention a,
                                                java.util.Set<java.lang.String> exceptWords)
Have extra proper noun except strings involved in semantic match


entityIsSpeaker

public static boolean entityIsSpeaker(Document document,
                                      Mention mention,
                                      Mention ant,
                                      Dictionaries dict)

mentionMatchesSpeakerAnnotation

public static boolean mentionMatchesSpeakerAnnotation(Mention mention,
                                                      Mention ant)

entityPersonDisagree

public static boolean entityPersonDisagree(Document document,
                                           Mention m,
                                           Mention ant,
                                           Dictionaries dict)

entitySameSpeaker

public static boolean entitySameSpeaker(Document document,
                                        Mention m,
                                        Mention ant)

entitySubjectObject

public static boolean entitySubjectObject(Mention m1,
                                          Mention m2)

entityTokenDistance

public static boolean entityTokenDistance(Mention m1,
                                          Mention m2)

entityClusterAllCorefDictionary

public static boolean entityClusterAllCorefDictionary(CorefCluster menCluster,
                                                      CorefCluster antCluster,
                                                      Dictionaries dict,
                                                      int dictColumn,
                                                      int freq)

entityCorefDictionary

public static boolean entityCorefDictionary(Mention men,
                                            Mention ant,
                                            Dictionaries dict,
                                            int dictVersion,
                                            int freq)

contextIncompatible

public static boolean contextIncompatible(Mention men,
                                          Mention ant,
                                          Dictionaries dict)

sentenceContextIncompatible

public static boolean sentenceContextIncompatible(Mention men,
                                                  Mention ant,
                                                  Dictionaries dict)


Stanford NLP Group