|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopennlp.tools.coref.resolver.AbstractResolver
public abstract class AbstractResolver
Default implementation of some methods in the Resolver interface.
| Field Summary | |
|---|---|
protected CountedSet |
distances
Debugging variable which holds statistics about mention distances durring training. |
protected int |
numEntitiesBack
The number of previous entities that resolver should consider. |
protected int |
numSentencesBack
The number of senteces 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 java.lang.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 java.lang.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 entites that should be considered for resolution with the specified discourse model. |
static java.lang.String |
getPronounGender(java.lang.String pronoun)
Returns a string representing the gender of the specifed pronoun. |
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 senteces back this resolver should look for a referent. |
protected java.lang.String |
stripNp(MentionContext mention)
Returns a string for the specified mention with punctuation, honorifics, designators, and determiners removed. |
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 distances
protected int numSentencesBack
| Constructor Detail |
|---|
public AbstractResolver(int neb)
| Method Detail |
|---|
protected int getNumEntities()
public void setNumberSentencesBack(int nsb)
nsb - the number of senteces 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 java.lang.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 Resolvermention - The mention which is being used for training.dm - the discourse model.
protected java.lang.String featureString(MentionContext mention)
mention - The mention.
protected java.lang.String stripNp(MentionContext mention)
mention - The mention to be striped.
public void train()
throws java.io.IOException
Resolver
train in interface Resolverjava.io.IOExceptionpublic static java.lang.String getPronounGender(java.lang.String pronoun)
pronoun - An English pronoun.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||