|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.coref.resolver.AbstractResolver
public abstract class AbstractResolver
Default implementation of some methods in the Resolver
interface.
Field Summary | |
---|---|
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 Summary | |
---|---|
AbstractResolver(int neb)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface opennlp.tools.coref.resolver.Resolver |
---|
canResolve, resolve |
Field Detail |
---|
protected int numEntitiesBack
protected boolean showExclusions
protected CountedSet<Integer> distances
protected int numSentencesBack
Constructor Detail |
---|
public AbstractResolver(int neb)
Method Detail |
---|
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)
Resolver
retain
in interface Resolver
mention
- The mention which is being used for training.dm
- the discourse model.
protected String featureString(MentionContext mention)
mention
- The mention.
public void train() throws IOException
Resolver
train
in interface Resolver
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |