opennlp.tools.coref.resolver
Class SingularPronounResolver

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

public class SingularPronounResolver
extends MaxentResolver

This class resolver singular pronouns such as "he", "she", "it" and their various forms.


Field Summary
 
Fields inherited from class opennlp.tools.coref.resolver.MaxentResolver
DEFAULT, DIFF, SAME
 
Constructor Summary
SingularPronounResolver(String projectName, ResolverMode m)
           
SingularPronounResolver(String projectName, ResolverMode m, NonReferentialResolver nonReferentialResolver)
           
 
Method Summary
 boolean canResolve(MentionContext mention)
          Returns true if this resolver is able to resolve the referring expression of the same type as the specified mention.
 boolean excluded(MentionContext mention, DiscourseEntity entity)
          Excludes entities which you are not compatible with the entity under consideration.
 
Methods inherited from class opennlp.tools.coref.resolver.MaxentResolver
resolve, retain, setSimilarityModel, train
 
Methods inherited from class opennlp.tools.coref.resolver.AbstractResolver
setNumberSentencesBack
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingularPronounResolver

public SingularPronounResolver(String projectName,
                               ResolverMode m)
                        throws IOException
Throws:
IOException

SingularPronounResolver

public SingularPronounResolver(String projectName,
                               ResolverMode m,
                               NonReferentialResolver nonReferentialResolver)
                        throws IOException
Throws:
IOException
Method Detail

canResolve

public boolean canResolve(MentionContext mention)
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:
mention - The mention being considered for resolution.
Returns:
true if the resolver handles this type of referring expression, false otherwise.

excluded

public boolean excluded(MentionContext mention,
                        DiscourseEntity entity)
Description copied from class: AbstractResolver
Excludes entities which you are not compatible with the entity under consideration. The default implementation excludes entities whose last extent contains the extent under consideration. This prevents possessive pronouns from referring to the noun phrases they modify and other undesirable things.

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


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