public class Document extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Document.DocType |
Modifier and Type | Field and Description |
---|---|
protected TwoDimensionalMap<Integer,Integer,Boolean> |
acronymCache |
Map<Integer,Mention> |
allGoldMentions |
Map<Mention,IntTuple> |
allPositions |
Map<Integer,Mention> |
allPredictedMentions
All mentions in a document mentionID -> mention
|
Annotation |
annotation
Document annotation
|
CoNLL2011DocumentReader.Document |
conllDoc
for conll shared task 2011
|
Map<Integer,CorefCluster> |
corefClusters
Clusters for coreferent mentions
|
Document.DocType |
docType
The type of document: conversational or article
|
Map<Integer,CorefCluster> |
goldCorefClusters
Gold Clusters for coreferent mentions
|
List<List<Mention>> |
goldOrderedMentionsBySentence
The list of gold mentions
|
int |
maxUtter |
Map<IntTuple,Mention> |
mentionheadPositions |
int |
numParagraph |
int |
numSentences |
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)
|
List<List<Mention>> |
predictedOrderedMentionsBySentence
The list of predicted mentions
|
Set<Mention> |
roleSet
Set of roles (in role apposition) in a document
|
Set<Pair<Integer,Integer>> |
speakerPairs
Pair of mention id, and the mention's speaker id
|
Map<Integer,String> |
speakers
UtteranceAnnotation -> String (speaker): mention ID or speaker string
|
Constructor and Description |
---|
Document() |
Document(Annotation anno,
List<List<Mention>> predictedMentions,
List<List<Mention>> goldMentions,
Dictionaries dict) |
Modifier and Type | Method and Description |
---|---|
void |
addIncompatible(Mention m1,
Mention m2) |
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 List<Pair<IntTuple,IntTuple>> |
getGoldLinks() |
List<List<Mention>> |
getOrderedMentions()
return the list of predicted mentions
|
SpeakerInfo |
getSpeakerInfo(String speaker) |
protected void |
initialize()
Document initialize
|
boolean |
isIncompatible(CorefCluster c1,
CorefCluster c2) |
boolean |
isIncompatible(Mention m1,
Mention m2) |
static boolean |
isSpeaker(Mention m,
Mention ant,
Dictionaries dict)
Check one mention is the speaker of the other mention
|
void |
mergeAcronymCache(CorefCluster to,
CorefCluster from) |
void |
mergeIncompatibles(CorefCluster to,
CorefCluster from) |
int |
numberOfSpeakers() |
protected void |
printMentionDetection() |
protected void |
processDiscourse(Dictionaries dict)
Process discourse information
|
public Document.DocType docType
public Annotation annotation
public CoNLL2011DocumentReader.Document conllDoc
public List<List<Mention>> goldOrderedMentionsBySentence
public List<List<Mention>> predictedOrderedMentionsBySentence
public Map<Integer,CorefCluster> corefClusters
public Map<Integer,CorefCluster> goldCorefClusters
public Map<Integer,Mention> allPredictedMentions
public Map<Mention,IntTuple> positions
public Map<Integer,String> speakers
public Set<Pair<Integer,Integer>> speakerPairs
public int maxUtter
public int numParagraph
public int numSentences
protected TwoDimensionalMap<Integer,Integer,Boolean> acronymCache
public Document()
public Document(Annotation anno, List<List<Mention>> predictedMentions, List<List<Mention>> goldMentions, Dictionaries dict)
public List<List<Mention>> getOrderedMentions()
protected void processDiscourse(Dictionaries dict)
protected void initialize()
public boolean isIncompatible(CorefCluster c1, CorefCluster c2)
public void mergeIncompatibles(CorefCluster to, CorefCluster from)
public void mergeAcronymCache(CorefCluster to, CorefCluster from)
protected void findTwinMentions(boolean strict)
protected void assignOriginalID()
public void extractGoldCorefClusters()
protected void extractGoldLinks()
public SpeakerInfo getSpeakerInfo(String speaker)
public int numberOfSpeakers()
public static boolean isSpeaker(Mention m, Mention ant, Dictionaries dict)
protected void printMentionDetection()