public class CorefChain
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
CorefChain.CorefMention
Mention for coref output.
|
protected static class |
CorefChain.CorefMentionComparator |
protected static class |
CorefChain.MentionComparator |
Constructor and Description |
---|
CorefChain(CorefCluster c,
java.util.Map<Mention,IntTuple> positions) |
CorefChain(int cid,
java.util.Map<IntPair,java.util.Set<CorefChain.CorefMention>> mentionMap,
CorefChain.CorefMention representative)
Constructor required by CustomAnnotationSerializer
|
Modifier and Type | Method and Description |
---|---|
void |
deleteMention(CorefChain.CorefMention m)
Delete a mention from this coreference chain.
|
boolean |
equals(java.lang.Object aThat) |
int |
getChainID() |
java.util.Map<IntPair,java.util.Set<CorefChain.CorefMention>> |
getMentionMap() |
java.util.List<CorefChain.CorefMention> |
getMentionsInTextualOrder()
get List of CorefMentions
|
java.util.Set<CorefChain.CorefMention> |
getMentionsWithSameHead(int sentenceNumber,
int headIndex)
get CorefMention by position
|
java.util.Set<CorefChain.CorefMention> |
getMentionsWithSameHead(IntPair position)
get CorefMentions by position (sentence number, headIndex) Can be multiple mentions sharing headword
|
CorefChain.CorefMention |
getRepresentativeMention()
Return the most representative mention in the chain.
|
int |
hashCode() |
java.lang.String |
toString() |
public CorefChain(CorefCluster c, java.util.Map<Mention,IntTuple> positions)
public CorefChain(int cid, java.util.Map<IntPair,java.util.Set<CorefChain.CorefMention>> mentionMap, CorefChain.CorefMention representative)
public boolean equals(java.lang.Object aThat)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.List<CorefChain.CorefMention> getMentionsInTextualOrder()
public java.util.Set<CorefChain.CorefMention> getMentionsWithSameHead(IntPair position)
public java.util.Set<CorefChain.CorefMention> getMentionsWithSameHead(int sentenceNumber, int headIndex)
public java.util.Map<IntPair,java.util.Set<CorefChain.CorefMention>> getMentionMap()
public CorefChain.CorefMention getRepresentativeMention()
public int getChainID()
public void deleteMention(CorefChain.CorefMention m)
m
- The mention to delete.public java.lang.String toString()
toString
in class java.lang.Object