edu.washington.cs.knowitall.extractor
Class ChunkedArgumentExtractor
java.lang.Object
edu.washington.cs.knowitall.extractor.Extractor<ChunkedExtraction,ChunkedArgumentExtraction>
edu.washington.cs.knowitall.extractor.ChunkedArgumentExtractor
public class ChunkedArgumentExtractor
- extends Extractor<ChunkedExtraction,ChunkedArgumentExtraction>
An Extractor
class for extracting noun phrase arguments, given a relation extraction.
It can be used to extract arguments to the left or right of the given relation extraction. This extractor
returns all candidate arguments for a relation. Mapper
classes can be used to filter down the
candidate arguments to a small set or a single argument (e.g. see the ClosestArgumentMapper
class).
- Author:
- afader
Nested Class Summary |
static class |
ChunkedArgumentExtractor.Mode
Controls the mode of an NpChunkArgumentExtractor : the LEFT mode makes the
extractor return noun phrase arguments to the left of the relation in the sentence, and the RIGHT
mode makes the extractor return noun phrase arguments to the right of the relation in the sentence. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChunkedArgumentExtractor
public ChunkedArgumentExtractor(ChunkedArgumentExtractor.Mode mode)
- Constructs a new
NpChunkArgumentExtractor
with the given mode (either LEFT
or
RIGHT
).
- Parameters:
mode
-
getMode
public ChunkedArgumentExtractor.Mode getMode()
- Returns:
- the mode of this extractor.
extractCandidates
protected java.lang.Iterable<ChunkedArgumentExtraction> extractCandidates(ChunkedExtraction rel)
- Description copied from class:
Extractor
- Extracts candidate extractions from the given source object. When the user calls the
extract(S source)
method, the extractCandidate(S source)
method is
used to generate a set of candidate extractions, which are then passed through each Mapper
object assigned to the extractor.
- Specified by:
extractCandidates
in class Extractor<ChunkedExtraction,ChunkedArgumentExtraction>
- Parameters:
rel
- The source to extract from.
- Returns:
- An
Iterable
object over the candidate extractions.