opennlp.tools.coref.resolver
Class AbstractResolver
java.lang.Object
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.
AbstractResolver
public AbstractResolver(int neb)
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.