edu.washington.cs.knowitall.extractor
Class ChunkedArgumentExtractor

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.Extractor<ChunkedExtraction,ChunkedArgumentExtraction>
      extended by 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.
 
Constructor Summary
ChunkedArgumentExtractor(ChunkedArgumentExtractor.Mode mode)
          Constructs a new NpChunkArgumentExtractor with the given mode (either LEFT or RIGHT).
 
Method Summary
protected  java.lang.Iterable<ChunkedArgumentExtraction> extractCandidates(ChunkedExtraction rel)
          Extracts candidate extractions from the given source object.
 ChunkedArgumentExtractor.Mode getMode()
           
 
Methods inherited from class edu.washington.cs.knowitall.extractor.Extractor
addMapper, compose, extract, extract, getMappers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkedArgumentExtractor

public ChunkedArgumentExtractor(ChunkedArgumentExtractor.Mode mode)
Constructs a new NpChunkArgumentExtractor with the given mode (either LEFT or RIGHT).

Parameters:
mode -
Method Detail

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.