public abstract class RelationFirstNpChunkExtractor extends Extractor<ChunkedSentence,ChunkedBinaryExtraction>
Extracts ChunkedBinaryExtraction objects by first extracting
relations, and then for each relation, extracting a pair of arguments. A
RelationFirstNpChunkExtractor must have:
Extractor<NpChunkedSentence, NpChunkedExtraction>Extractor<NpChunkedExtraction, NpChunkArgumentExtraction>Extractor<NpChunkedExtraction, NpChunkArgumentExtraction>
Subclasses extending RelationFirstNpChunkExtractor are responsible
for setting the extractors via the
setRelationExtractor(Extractor),
setArgument1Extractor(Extractor), and
setArgument2Extractor(Extractor)
methods.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowUnary |
protected Extractor<ChunkedExtraction,ChunkedArgumentExtraction> |
arg1Extr |
protected Extractor<ChunkedExtraction,ChunkedArgumentExtraction> |
arg2Extr |
protected Extractor<ChunkedSentence,ChunkedExtraction> |
relExtr |
| Constructor and Description |
|---|
RelationFirstNpChunkExtractor() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ChunkedBinaryExtraction> |
extractCandidates(ChunkedSentence source)
Extracts candidate extractions from the given source object.
|
Extractor<ChunkedExtraction,ChunkedArgumentExtraction> |
getArgument1Extractor() |
Extractor<ChunkedExtraction,ChunkedArgumentExtraction> |
getArgument2Extractor() |
Extractor<ChunkedSentence,ChunkedExtraction> |
getRelationExtractor() |
void |
setAllowUnary(boolean allowUnary) |
void |
setArgument1Extractor(Extractor<ChunkedExtraction,ChunkedArgumentExtraction> arg1Extr)
Sets the argument1 extractor.
|
void |
setArgument2Extractor(Extractor<ChunkedExtraction,ChunkedArgumentExtraction> arg2Extr)
Sets the argument2 extractor.
|
void |
setRelationExtractor(Extractor<ChunkedSentence,ChunkedExtraction> relExtr)
Sets the relation extractor.
|
addMapper, compose, extract, getMappersprotected boolean allowUnary
protected Extractor<ChunkedSentence,ChunkedExtraction> relExtr
protected Extractor<ChunkedExtraction,ChunkedArgumentExtraction> arg1Extr
protected Extractor<ChunkedExtraction,ChunkedArgumentExtraction> arg2Extr
public Extractor<ChunkedSentence,ChunkedExtraction> getRelationExtractor()
public Extractor<ChunkedExtraction,ChunkedArgumentExtraction> getArgument1Extractor()
public Extractor<ChunkedExtraction,ChunkedArgumentExtraction> getArgument2Extractor()
public void setRelationExtractor(Extractor<ChunkedSentence,ChunkedExtraction> relExtr)
relExtr - public void setArgument1Extractor(Extractor<ChunkedExtraction,ChunkedArgumentExtraction> arg1Extr)
arg1Extr - public void setArgument2Extractor(Extractor<ChunkedExtraction,ChunkedArgumentExtraction> arg2Extr)
arg2Extr - public void setAllowUnary(boolean allowUnary)
protected Collection<ChunkedBinaryExtraction> extractCandidates(ChunkedSentence source) throws ExtractorException
ExtractorExtractor.extract(Object), the this method is
used to generate a set of candidate extractions, which are then passed
through each mapper object attached to the extractor.extractCandidates in class Extractor<ChunkedSentence,ChunkedBinaryExtraction>source - the source to extract from.ExtractorException - if unable to extractCopyright © 2010-2013 University of Washington CSE. All Rights Reserved.