com.aliasi.coref.matchers
Class EntityTypeMatch

java.lang.Object
  extended by com.aliasi.coref.BooleanMatcherAdapter
      extended by com.aliasi.coref.matchers.EntityTypeMatch
All Implemented Interfaces:
Matcher

public class EntityTypeMatch
extends BooleanMatcherAdapter

Implements a matching function that returns the score specified in the constructor if the mention has the specified entity type.

Since:
LingPipe1.0
Version:
1.0
Author:
Bob Carpenter

Field Summary
 
Fields inherited from interface com.aliasi.coref.Matcher
MAX_DISTANCE_SCORE, MAX_SCORE, MAX_SEMANTIC_SCORE, NO_MATCH_SCORE
 
Constructor Summary
EntityTypeMatch(int score, String entityType)
          Construct an instance of an entity type matcher that returns the specified score for a match against a mention of the specified type.
 
Method Summary
 boolean matchBoolean(Mention mention, MentionChain chain)
          Returns true if the mention has the type that was specified in the constructor.
 
Methods inherited from class com.aliasi.coref.BooleanMatcherAdapter
match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityTypeMatch

public EntityTypeMatch(int score,
                       String entityType)
Construct an instance of an entity type matcher that returns the specified score for a match against a mention of the specified type.

Parameters:
score - Score to return if there is a match.
entityType - Entity type of mention resulting in a match.
Method Detail

matchBoolean

public boolean matchBoolean(Mention mention,
                            MentionChain chain)
Returns true if the mention has the type that was specified in the constructor.

Specified by:
matchBoolean in class BooleanMatcherAdapter
Parameters:
mention - Mention to match.
chain - Mention chain to match.
Returns:
true if the mention has the specified type.