edu.stanford.nlp.dcoref
Class RuleBasedCorefMentionFinder

java.lang.Object
  extended by edu.stanford.nlp.dcoref.RuleBasedCorefMentionFinder
All Implemented Interfaces:
CorefMentionFinder

public class RuleBasedCorefMentionFinder
extends java.lang.Object
implements CorefMentionFinder


Field Summary
protected  boolean assignIds
           
protected  int maxID
           
protected  Annotator parserProcessor
           
 
Constructor Summary
RuleBasedCorefMentionFinder()
           
 
Method Summary
protected  void extractEnumerations(CoreMap s, java.util.List<Mention> mentions, java.util.Set<IntPair> mentionSpanSet, java.util.Set<IntPair> namedEntitySpanSet)
          Extract enumerations (A, B, and C)
protected  void extractNamedEntityMentions(CoreMap s, java.util.List<Mention> mentions, java.util.Set<IntPair> mentionSpanSet, java.util.Set<IntPair> namedEntitySpanSet)
           
protected  void extractNPorPRP(CoreMap s, java.util.List<Mention> mentions, java.util.Set<IntPair> mentionSpanSet, java.util.Set<IntPair> namedEntitySpanSet)
           
 java.util.List<java.util.List<Mention>> extractPredictedMentions(Annotation doc, int _maxID, Dictionaries dict)
          Main method of mention detection.
 java.util.List<java.util.List<Mention>> filterPredictedMentions(java.util.List<java.util.List<Mention>> allGoldMentions, Annotation doc, Dictionaries dict)
          When mention boundaries are given
protected  void findHead(CoreMap s, java.util.List<Mention> mentions)
           
protected  Tree findSyntacticHead(Mention m, Tree root, java.util.List<CoreLabel> tokens)
           
protected static void removeSpuriousMentions(CoreMap s, java.util.List<Mention> mentions, Dictionaries dict)
          Filter out all spurious mentions
protected static void setBarePlural(java.util.List<Mention> mentions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

assignIds

protected boolean assignIds

maxID

protected int maxID

parserProcessor

protected Annotator parserProcessor
Constructor Detail

RuleBasedCorefMentionFinder

public RuleBasedCorefMentionFinder()
Method Detail

filterPredictedMentions

public java.util.List<java.util.List<Mention>> filterPredictedMentions(java.util.List<java.util.List<Mention>> allGoldMentions,
                                                                       Annotation doc,
                                                                       Dictionaries dict)
When mention boundaries are given


extractPredictedMentions

public java.util.List<java.util.List<Mention>> extractPredictedMentions(Annotation doc,
                                                                        int _maxID,
                                                                        Dictionaries dict)
Main method of mention detection. Extract all NP, PRP or NE, and filter out by manually written patterns.

Specified by:
extractPredictedMentions in interface CorefMentionFinder
Parameters:
doc - The syntactically annotated document
_maxID - The last mention ID assigned. New ones are assigned starting one above this number.
dict - Dictionaries for coref.
Returns:
For each of the List of sentences in the document, a List of Mention objects

setBarePlural

protected static void setBarePlural(java.util.List<Mention> mentions)

extractNamedEntityMentions

protected void extractNamedEntityMentions(CoreMap s,
                                          java.util.List<Mention> mentions,
                                          java.util.Set<IntPair> mentionSpanSet,
                                          java.util.Set<IntPair> namedEntitySpanSet)

extractNPorPRP

protected void extractNPorPRP(CoreMap s,
                              java.util.List<Mention> mentions,
                              java.util.Set<IntPair> mentionSpanSet,
                              java.util.Set<IntPair> namedEntitySpanSet)

extractEnumerations

protected void extractEnumerations(CoreMap s,
                                   java.util.List<Mention> mentions,
                                   java.util.Set<IntPair> mentionSpanSet,
                                   java.util.Set<IntPair> namedEntitySpanSet)
Extract enumerations (A, B, and C)


findHead

protected void findHead(CoreMap s,
                        java.util.List<Mention> mentions)

findSyntacticHead

protected Tree findSyntacticHead(Mention m,
                                 Tree root,
                                 java.util.List<CoreLabel> tokens)

removeSpuriousMentions

protected static void removeSpuriousMentions(CoreMap s,
                                             java.util.List<Mention> mentions,
                                             Dictionaries dict)
Filter out all spurious mentions



Stanford NLP Group