opennlp.tools.coref.resolver
Class IsAResolver

java.lang.Object
  extended by opennlp.tools.coref.resolver.AbstractResolver
      extended by opennlp.tools.coref.resolver.MaxentResolver
          extended by opennlp.tools.coref.resolver.IsAResolver
All Implemented Interfaces:
Resolver

public class IsAResolver
extends MaxentResolver

Resolves coreference between appositives.


Field Summary
 
Fields inherited from class opennlp.tools.coref.resolver.MaxentResolver
DEFAULT, DIFF, nonReferentialResolver, pairedSampleSelection, preferFirstReferent, SAME, useSameModelForNonRef
 
Fields inherited from class opennlp.tools.coref.resolver.AbstractResolver
distances, numEntitiesBack, numSentencesBack, showExclusions
 
Constructor Summary
IsAResolver(java.lang.String projectName, ResolverMode m)
           
IsAResolver(java.lang.String projectName, ResolverMode m, NonReferentialResolver nrr)
           
 
Method Summary
 boolean canResolve(MentionContext ec)
          Returns true if this resolver is able to resolve the referening experession of the same type as the specified mention.
protected  boolean defaultReferent(DiscourseEntity de)
          Returns whether the specified entity satisfies the criteria for being a default referent.
protected  boolean excluded(MentionContext ec, DiscourseEntity de)
          Excludes entities which you are not compatible with the entity under consideration.
protected  java.util.List getFeatures(MentionContext mention, DiscourseEntity entity)
          Returns a list of features for deciding whether the specificed mention refers to the specified discourse entity.
protected  boolean outOfRange(MentionContext ec, DiscourseEntity de)
          Determines if the specified entity is too far from the specified mention to be resolved to it.
 
Methods inherited from class opennlp.tools.coref.resolver.MaxentResolver
definiteArticle, getContextFeatures, getDistanceFeatures, getMentionCountFeature, getPronounMatchFeatures, getStringMatchFeatures, getWordFeatures, loadAsResource, loadAsResource, resolve, retain, setSimilarityModel, train
 
Methods inherited from class opennlp.tools.coref.resolver.AbstractResolver
featureString, getHead, getHeadIndex, getHeadString, getNumEntities, getNumEntities, getPronounGender, setNumberSentencesBack, stripNp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsAResolver

public IsAResolver(java.lang.String projectName,
                   ResolverMode m)
            throws java.io.IOException
Throws:
java.io.IOException

IsAResolver

public IsAResolver(java.lang.String projectName,
                   ResolverMode m,
                   NonReferentialResolver nrr)
            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

canResolve

public boolean canResolve(MentionContext ec)
Description copied from interface: Resolver
Returns true if this resolver is able to resolve the referening experession of the same type as the specified mention.

Parameters:
ec - The mention being considered for resolution.
Returns:
true if the resolver handles this type of refering expression, false otherwise.

excluded

protected boolean excluded(MentionContext ec,
                           DiscourseEntity de)
Description copied from class: AbstractResolver
Excludes entities which you are not compatible with the entity under consideration. The default implementation excludes entties whose last extent contatins the extent under consideration. This prevents posessive pronouns from refering to the noun phrases they modify and other undesireable things.

Overrides:
excluded in class MaxentResolver
Parameters:
ec - The mention which is being considered as referential.
de - The entity to which the mention is to be resolved.
Returns:
true if the entity should be excluded, false otherwise.

outOfRange

protected boolean outOfRange(MentionContext ec,
                             DiscourseEntity de)
Description copied from class: AbstractResolver
Determines if the specified entity is too far from the specified mention to be resolved to it. Once an entity has been determined to be out of range subsequent entities are not considered. To skip intermediate entities @see excluded.

Overrides:
outOfRange in class AbstractResolver
Parameters:
ec - The mention which is being considered.
de - The entity to which the mention is to be resolved.
Returns:
true is the entity is in range of the mention, false otherwise.

defaultReferent

protected boolean defaultReferent(DiscourseEntity de)
Description copied from class: MaxentResolver
Returns whether the specified entity satisfies the criteria for being a default referent. This criteria is used to perform sample selection on the training data and to select a single non-referent entity. Typcically the criteria is a hueristic for a likly referent.

Overrides:
defaultReferent in class MaxentResolver
Parameters:
de - The discourse entity being considered for non-reference.
Returns:
True if the entity should be used as a default referent, false otherwise.

getFeatures

protected java.util.List getFeatures(MentionContext mention,
                                     DiscourseEntity entity)
Description copied from class: MaxentResolver
Returns a list of features for deciding whether the specificed mention refers to the specified discourse entity.

Overrides:
getFeatures in class MaxentResolver
Parameters:
mention - the mention being considers as possibly referential.
entity - The disource entity with which the mention is being considered referential.
Returns:
a list of features used to predict reference between the specified mention and entity.


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