edu.columbia.cs.cg.pattern.prdualrank
Class ExtractionPattern<T extends Relationship,D extends TokenizedDocument>
java.lang.Object
edu.columbia.cs.ref.model.pattern.Pattern<Relationship,TokenizedDocument>
edu.columbia.cs.cg.pattern.prdualrank.ExtractionPattern<T,D>
- Type Parameters:
T
- the type of relationship that this pattern extractsD
- 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
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
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 matchsimpleAttributeMap
- map that associates each role to the subpattern surounding the entity that must fulfill itrType
- the type of relationship that must be extracted
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