public final class WithinDocCoref extends Object
WithinDocCoref object handles resolution of
coreference relations between mentions of entities.| Modifier and Type | Field and Description |
|---|---|
static Comparator<MentionChain> |
SENTENCE_FINAL_COMPARATOR
A comparator for comparing two mentions chains.
|
| Constructor and Description |
|---|
WithinDocCoref(MentionFactory mentionFactory)
Construct an instance of within-document coreference with
the specified mention factory.
|
| Modifier and Type | Method and Description |
|---|---|
MentionChain[] |
mentionChains()
Returns the set of mention chains, sorted in order of
identifier from first appearance to last.
|
int |
resolveMention(Mention mention,
int offset)
Resolves a specified mention at a specified offset, returning
the integer identifier of the mention, or
-1 if the
mention could not be resolved, which should only occur for
pronominal mentions. |
public static final Comparator<MentionChain> SENTENCE_FINAL_COMPARATOR
0 for 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)
-1 if the
mention could not be resolved, which should only occur for
pronominal mentions.mention - Mention to resolve.offset - Sentence offset of the specified mention.-1
if it could not be resolved.Copyright © 2016 Alias-i, Inc.. All rights reserved.