public final class WithinDocCoref extends Object
WithinDocCorefobject handles resolution of coreference relations between mentions of entities.
|Modifier and Type||Field and Description|
A comparator for comparing two mentions chains.
|Constructor and Description|
Construct an instance of within-document coreference with the specified mention factory.
|Modifier and Type||Method and Description|
Returns the set of mention chains, sorted in order of identifier from first appearance to last.
Resolves a specified mention at a specified offset, returning the integer identifier of the mention, or
public static final Comparator<MentionChain> SENTENCE_FINAL_COMPARATOR
0for entities that are not equal according to but this is OK because they're just being sorted. Also * not coordinated with the mention chain's equality or hash code. * The sort is also not stable; changing mention chains by adding mentions may change the results in subsequent runs.
public WithinDocCoref(MentionFactory mentionFactory)
mentionFactory- Factory for creating mentions and chains.
public MentionChain mentionChains()
public int resolveMention(Mention mention, int offset)
-1if the mention could not be resolved, which should only occur for pronominal mentions.
mention- Mention to resolve.
offset- Sentence offset of the specified mention.
-1if it could not be resolved.