edu.stanford.nlp.dcoref
Class Document

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

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

See Also:
Serialized Form

Nested Class Summary
static class Document.DocType
           
 
Field Summary
 java.util.Map<java.lang.Integer,Mention> allGoldMentions
           
 java.util.Map<java.lang.Integer,Mention> allPredictedMentions
          All mentions in a document mentionID -> mention
 Annotation annotation
          Document annotation
 CoNLL2011DocumentReader.Document conllDoc
          for conll shared task 2011
 java.util.Map<java.lang.Integer,CorefCluster> corefClusters
          Clusters for coreferent mentions
 Document.DocType docType
          The type of document: conversational or article
 java.util.Map<java.lang.Integer,CorefCluster> goldCorefClusters
          Gold Clusters for coreferent mentions
 java.util.List<java.util.List<Mention>> goldOrderedMentionsBySentence
          The list of gold mentions
 java.util.Set<Pair<java.lang.Integer,java.lang.Integer>> incompatibles
          Set of incompatible mention pairs
 int maxUtter
           
 java.util.Map<IntTuple,Mention> mentionheadPositions
           
 int numParagraph
           
 int numSentences
           
 java.util.Map<Mention,IntTuple> positions
          Position of each mention in the input matrix Each mention occurrence with sentence # and position within sentence (Nth mention, not Nth token)
 java.util.List<java.util.List<Mention>> predictedOrderedMentionsBySentence
          The list of predicted mentions
 java.util.Set<Mention> roleSet
          Set of roles (in role apposition) in a document
 java.util.Set<Pair<java.lang.Integer,java.lang.Integer>> speakerPairs
          mention ID pair
 java.util.Map<java.lang.Integer,java.lang.String> speakers
          UtteranceAnnotation -> String (speaker): mention ID or speaker string
 
Constructor Summary
Document()
           
Document(Annotation anno, java.util.List<java.util.List<Mention>> predictedMentions, java.util.List<java.util.List<Mention>> goldMentions, Dictionaries dict)
           
 
Method Summary
protected  void assignOriginalID()
          When there is no mentionID information (without gold annotation), assign mention IDs
 void extractGoldCorefClusters()
          Extract gold coref cluster information.
protected  void extractGoldLinks()
          Extract gold coref link information
protected  void findTwinMentions(boolean strict)
          Mark twin mentions in gold and predicted mentions
protected  java.util.List<Pair<IntTuple,IntTuple>> getGoldLinks()
           
 java.util.List<java.util.List<Mention>> getOrderedMentions()
          return the list of predicted mentions
protected  void initialize()
          Document initialize
static boolean isSpeaker(Mention m, Mention ant, Dictionaries dict)
          Check one mention is the speaker of the other mention
protected  void printMentionDetection()
           
protected  void processDiscourse(Dictionaries dict)
          Process discourse information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

docType

public Document.DocType docType
The type of document: conversational or article


annotation

public Annotation annotation
Document annotation


conllDoc

public CoNLL2011DocumentReader.Document conllDoc
for conll shared task 2011


goldOrderedMentionsBySentence

public java.util.List<java.util.List<Mention>> goldOrderedMentionsBySentence
The list of gold mentions


predictedOrderedMentionsBySentence

public java.util.List<java.util.List<Mention>> predictedOrderedMentionsBySentence
The list of predicted mentions


corefClusters

public java.util.Map<java.lang.Integer,CorefCluster> corefClusters
Clusters for coreferent mentions


goldCorefClusters

public java.util.Map<java.lang.Integer,CorefCluster> goldCorefClusters
Gold Clusters for coreferent mentions


allPredictedMentions

public java.util.Map<java.lang.Integer,Mention> allPredictedMentions
All mentions in a document mentionID -> mention


allGoldMentions

public java.util.Map<java.lang.Integer,Mention> allGoldMentions

roleSet

public java.util.Set<Mention> roleSet
Set of roles (in role apposition) in a document


positions

public java.util.Map<Mention,IntTuple> positions
Position of each mention in the input matrix Each mention occurrence with sentence # and position within sentence (Nth mention, not Nth token)


mentionheadPositions

public final java.util.Map<IntTuple,Mention> mentionheadPositions

speakers

public java.util.Map<java.lang.Integer,java.lang.String> speakers
UtteranceAnnotation -> String (speaker): mention ID or speaker string


speakerPairs

public java.util.Set<Pair<java.lang.Integer,java.lang.Integer>> speakerPairs
mention ID pair


maxUtter

public int maxUtter

numParagraph

public int numParagraph

numSentences

public int numSentences

incompatibles

public java.util.Set<Pair<java.lang.Integer,java.lang.Integer>> incompatibles
Set of incompatible mention pairs

Constructor Detail

Document

public Document()

Document

public Document(Annotation anno,
                java.util.List<java.util.List<Mention>> predictedMentions,
                java.util.List<java.util.List<Mention>> goldMentions,
                Dictionaries dict)
Method Detail

getOrderedMentions

public java.util.List<java.util.List<Mention>> getOrderedMentions()
return the list of predicted mentions


processDiscourse

protected void processDiscourse(Dictionaries dict)
Process discourse information


initialize

protected void initialize()
Document initialize


findTwinMentions

protected void findTwinMentions(boolean strict)
Mark twin mentions in gold and predicted mentions


assignOriginalID

protected void assignOriginalID()
When there is no mentionID information (without gold annotation), assign mention IDs


extractGoldCorefClusters

public void extractGoldCorefClusters()
Extract gold coref cluster information.


getGoldLinks

protected java.util.List<Pair<IntTuple,IntTuple>> getGoldLinks()

extractGoldLinks

protected void extractGoldLinks()
Extract gold coref link information


isSpeaker

public static boolean isSpeaker(Mention m,
                                Mention ant,
                                Dictionaries dict)
Check one mention is the speaker of the other mention


printMentionDetection

protected void printMentionDetection()


Stanford NLP Group