opennlp.tools.coref.resolver
Class AbstractResolver

java.lang.Object
  extended by opennlp.tools.coref.resolver.AbstractResolver
All Implemented Interfaces:
Resolver
Direct Known Subclasses:
MaxentResolver, PerfectResolver

public abstract class AbstractResolver
extends Object
implements Resolver

Default implementation of some methods in the Resolver interface.


Constructor Summary
AbstractResolver(int neb)
           
 
Method Summary
 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface opennlp.tools.coref.resolver.Resolver
canResolve, resolve
 

Constructor Detail

AbstractResolver

public AbstractResolver(int neb)
Method Detail

setNumberSentencesBack

public void setNumberSentencesBack(int nsb)
Specifies the number of sentences back this resolver should look for a referent.

Parameters:
nsb - the number of sentences back this resolver should look for a referent.

retain

public DiscourseEntity retain(MentionContext mention,
                              DiscourseModel dm)
Description copied from interface: Resolver
Uses the specified mention and discourse model to train this resolver. All mentions sent to this method need to have their id fields set to indicate coreference relationships.

Specified by:
retain in interface Resolver
Parameters:
mention - The mention which is being used for training.
dm - the discourse model.
Returns:
the discourse entity which is referred to by the referring expression or null if no discourse entity is referenced.

train

public void train()
           throws IOException
Description copied from interface: Resolver
Retrains model on examples for which retain was called.

Specified by:
train in interface Resolver
Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.