public abstract class AbstractResolver extends Object implements Resolver
Resolver interface.| Modifier and Type | Field and Description |
|---|---|
protected CountedSet<Integer> |
distances
Debugging variable which holds statistics about mention distances
during training.
|
protected int |
numEntitiesBack
The number of previous entities that resolver should consider.
|
protected int |
numSentencesBack
The number of sentences back this resolver should look for a referent.
|
protected boolean |
showExclusions
Debugging variable which specifies whether error output is generated
if a class excludes as possibly coreferent mentions which are in-fact
coreferent.
|
| Constructor and Description |
|---|
AbstractResolver(int neb) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
excluded(MentionContext mention,
DiscourseEntity entity)
Excludes entities which you are not compatible with the entity under consideration.
|
protected String |
featureString(MentionContext mention)
Returns the string of "_" delimited tokens for the specified mention.
|
protected Parse |
getHead(MentionContext mention)
Returns the head parse for the specified mention.
|
protected int |
getHeadIndex(MentionContext mention)
Returns the index for the head word for the specified mention.
|
protected String |
getHeadString(MentionContext mention)
Returns the text of the head word for the specified mention.
|
protected int |
getNumEntities()
Returns the number of previous entities that resolver should consider.
|
protected int |
getNumEntities(DiscourseModel dm)
The number of entities that should be considered for resolution with the specified discourse model.
|
protected boolean |
outOfRange(MentionContext mention,
DiscourseEntity entity)
Determines if the specified entity is too far from the specified mention to be resolved to it.
|
DiscourseEntity |
retain(MentionContext mention,
DiscourseModel dm)
Uses the specified mention and discourse model to train this resolver.
|
void |
setNumberSentencesBack(int nsb)
Specifies the number of sentences back this resolver should look for a referent.
|
void |
train()
Retrains model on examples for which retain was called.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanResolve, resolveprotected int numEntitiesBack
protected boolean showExclusions
protected CountedSet<Integer> distances
protected int numSentencesBack
protected int getNumEntities()
public void setNumberSentencesBack(int nsb)
nsb - the number of sentences back this resolver should look for a referent.protected int getNumEntities(DiscourseModel dm)
dm - The discourse model.protected Parse getHead(MentionContext mention)
mention - The mention.protected int getHeadIndex(MentionContext mention)
mention - The mention.protected String getHeadString(MentionContext mention)
mention - The mention.protected boolean outOfRange(MentionContext mention, DiscourseEntity entity)
mention - The mention which is being considered.entity - The entity to which the mention is to be resolved.protected boolean excluded(MentionContext mention, DiscourseEntity entity)
mention - The mention which is being considered as referential.entity - The entity to which the mention is to be resolved.public DiscourseEntity retain(MentionContext mention, DiscourseModel dm)
Resolverprotected String featureString(MentionContext mention)
mention - The mention.public void train()
throws IOException
Resolvertrain in interface ResolverIOExceptionCopyright © 2019 The Apache Software Foundation. All rights reserved.