edu.columbia.cs.cg.pattern.prdualrank
Class ExtractionPattern<T extends Relationship,D extends TokenizedDocument>

java.lang.Object
  extended by edu.columbia.cs.ref.model.pattern.Pattern<Relationship,TokenizedDocument>
      extended by edu.columbia.cs.cg.pattern.prdualrank.ExtractionPattern<T,D>
Type Parameters:
T - the type of relationship that this pattern extracts
D - the type of document that we can extract from

public class ExtractionPattern<T extends Relationship,D extends TokenizedDocument>
extends Pattern<Relationship,TokenizedDocument>

The Class ExtractionPattern represents a pattern that can be used for Relationship Extraction.

An ExtractionPattern is composed by several roles that can be fulfilled by entities of the relationship that we are trying to extract. Each role in the ExtractionPattern is also associated with a subpattern that is an object of the class SimpleAttributeExtractionPattern.

Since:
2011-09-27
Version:
0.1
Author:
Pablo Barrio, Goncalo Simoes

Constructor Summary
ExtractionPattern(java.util.List<java.lang.String> roles, java.util.Map<java.lang.String,SimpleAttributeExtractionPattern<Entity,TokenizedDocument>> simpleAttributeMap, RelationshipType rType)
          Instantiates a new extraction pattern.
 
Method Summary
 java.util.List<Relationship> findMatch(TokenizedDocument d)
          Abstract method that finds all matches in the input document
 
Methods inherited from class edu.columbia.cs.ref.model.pattern.Pattern
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtractionPattern

public ExtractionPattern(java.util.List<java.lang.String> roles,
                         java.util.Map<java.lang.String,SimpleAttributeExtractionPattern<Entity,TokenizedDocument>> simpleAttributeMap,
                         RelationshipType rType)
Instantiates a new extraction pattern.

Parameters:
roles - the list of roles that this pattern must match
simpleAttributeMap - map that associates each role to the subpattern surounding the entity that must fulfill it
rType - the type of relationship that must be extracted
Method Detail

findMatch

public java.util.List<Relationship> findMatch(TokenizedDocument d)
Description copied from class: Pattern
Abstract method that finds all matches in the input document

Specified by:
findMatch in class Pattern<Relationship,TokenizedDocument>
Parameters:
d - the document where we are looking for the matches
Returns:
the matched objects in document d