edu.columbia.cs.cg.pattern.prdualrank
Class SimpleAttributeExtractionPattern<E extends Entity,D extends TokenizedDocument>
java.lang.Object
edu.columbia.cs.ref.model.pattern.Pattern<Entity,TokenizedDocument>
edu.columbia.cs.cg.pattern.prdualrank.SimpleAttributeExtractionPattern<E,D>
- Type Parameters:
E
- the element typeD
- 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. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
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 entityentityTypes
- a set of entity types that can match the patternbefore
- the array of words before the entityafter
- the array of words after the entity
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>