edu.columbia.cs.cg.pattern.prdualrank
Class SimpleAttributeExtractionPattern<E extends Entity,D extends TokenizedDocument>

java.lang.Object
  extended by edu.columbia.cs.ref.model.pattern.Pattern<Entity,TokenizedDocument>
      extended by edu.columbia.cs.cg.pattern.prdualrank.SimpleAttributeExtractionPattern<E,D>
Type Parameters:
E - the element type
D - the generic type

public class SimpleAttributeExtractionPattern<E extends Entity,D extends TokenizedDocument>
extends Pattern<Entity,TokenizedDocument>

The Class SimpleAttributeExtractionPattern represents a pattern that can be used for Role Extraction.

A SimpleAttributeExtractionPattern is composed by a set of entity types that can match the pattern, a list of words before the entity, a list of words after the entity and finally the role to be assigned to the extracted entity

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

Constructor Summary
SimpleAttributeExtractionPattern(java.lang.String role, java.util.Set<java.lang.String> entityTypes, java.lang.String[] before, java.lang.String[] after)
          Instantiates a new simple attribute extraction pattern.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<Entity> findMatch(TokenizedDocument d)
          Abstract method that finds all matches in the input document
 
Methods inherited from class edu.columbia.cs.ref.model.pattern.Pattern
hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleAttributeExtractionPattern

public SimpleAttributeExtractionPattern(java.lang.String role,
                                        java.util.Set<java.lang.String> entityTypes,
                                        java.lang.String[] before,
                                        java.lang.String[] after)
Instantiates a new simple attribute extraction pattern.

Parameters:
role - the role to be assigned to the extracted entity
entityTypes - a set of entity types that can match the pattern
before - the array of words before the entity
after - the array of words after the entity
Method Detail

findMatch

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

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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Pattern<Entity,TokenizedDocument>