opennlp.tools.coref.resolver
Class PerfectResolver

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

public class PerfectResolver
extends AbstractResolver

Resolver used in training to update the discourse model based on the coreference annotation.


Field Summary
 
Fields inherited from class opennlp.tools.coref.resolver.AbstractResolver
distances, numEntitiesBack, numSentencesBack, showExclusions
 
Constructor Summary
PerfectResolver()
           
 
Method Summary
 boolean canResolve(MentionContext ec)
          Returns true if this resolver is able to resolve the referring expression of the same type as the specified mention.
protected  boolean outOfRange(MentionContext ec, DiscourseEntity de)
          Determines if the specified entity is too far from the specified mention to be resolved to it.
 DiscourseEntity resolve(MentionContext ec, DiscourseModel dm)
          Resolve this referring expression to a discourse entity in the discourse model.
 
Methods inherited from class opennlp.tools.coref.resolver.AbstractResolver
excluded, featureString, getHead, getHeadIndex, getHeadString, getNumEntities, getNumEntities, retain, setNumberSentencesBack, train
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerfectResolver

public PerfectResolver()
Method Detail

canResolve

public boolean canResolve(MentionContext ec)
Description copied from interface: Resolver
Returns true if this resolver is able to resolve the referring expression 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 referring expression, 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.

resolve

public DiscourseEntity resolve(MentionContext ec,
                               DiscourseModel dm)
Description copied from interface: Resolver
Resolve this referring expression to a discourse entity in the discourse model.

Parameters:
ec - the referring expression.
dm - the discourse model.
Returns:
the discourse entity which the resolver believes this referring expression refers to or null if no discourse entity is coreferent with the referring expression.


Copyright © 2010. All Rights Reserved.