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 java.lang.Object
implements NonReferentialResolver

Default implementation of the NonReferentialResolver interface.


Constructor Summary
DefaultNonReferentialResolver(java.lang.String projectName, java.lang.String name, ResolverMode mode)
           
 
Method Summary
 void addEvent(MentionContext ec)
          Designates that the specified mention be used for training.
protected  java.util.List getFeatures(MentionContext mention)
           
protected  java.util.List getNonReferentialFeatures(MentionContext mention)
          Returns a list of featues used to predict whether the sepcified mention is non-referential.
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNonReferentialResolver

public DefaultNonReferentialResolver(java.lang.String projectName,
                                     java.lang.String name,
                                     ResolverMode mode)
                              throws java.io.IOException
Throws:
java.io.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.

getFeatures

protected java.util.List getFeatures(MentionContext mention)

getNonReferentialFeatures

protected java.util.List getNonReferentialFeatures(MentionContext mention)
Returns a list of featues used to predict whether the sepcified mention is non-referential.

Parameters:
mention - The mention under considereation.
Returns:
a list of featues used to predict whether the sepcified mention is non-referential.

train

public void train()
           throws java.io.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:
java.io.IOException - When the model can not be written out.


Copyright 2008 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.