opennlp.tools.coref.resolver
Class DefaultNonReferentialResolver

java.lang.Object
  extended by opennlp.tools.coref.resolver.DefaultNonReferentialResolver
All Implemented Interfaces:
NonReferentialResolver
Direct Known Subclasses:
SingletonNonReferentialResolver

public class DefaultNonReferentialResolver
extends Object
implements NonReferentialResolver

Default implementation of the NonReferentialResolver interface.


Constructor Summary
DefaultNonReferentialResolver(String projectName, String name, ResolverMode mode)
           
 
Method Summary
 void addEvent(MentionContext ec)
          Designates that the specified mention be used for training.
 double getNonReferentialProbability(MentionContext mention)
          Returns the probability that the specified mention doesn't refer to any previous mention.
 void train()
          Trains a model based on the events given to this resolver via #addEvent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNonReferentialResolver

public DefaultNonReferentialResolver(String projectName,
                                     String name,
                                     ResolverMode mode)
                              throws IOException
Throws:
IOException
Method Detail

getNonReferentialProbability

public double getNonReferentialProbability(MentionContext mention)
Description copied from interface: NonReferentialResolver
Returns the probability that the specified mention doesn't refer to any previous mention.

Specified by:
getNonReferentialProbability in interface NonReferentialResolver
Parameters:
mention - The mention under consideration.
Returns:
A probability that the specified mention doesn't refer to any previous mention.

addEvent

public void addEvent(MentionContext ec)
Description copied from interface: NonReferentialResolver
Designates that the specified mention be used for training.

Specified by:
addEvent in interface NonReferentialResolver
Parameters:
ec - The mention to be used. The mention id is used to determine whether this mention is referential or non-referential.

train

public void train()
           throws IOException
Description copied from interface: NonReferentialResolver
Trains a model based on the events given to this resolver via #addEvent.

Specified by:
train in interface NonReferentialResolver
Throws:
IOException - When the model can not be written out.


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