edu.washington.cs.knowitall.extractor
Class ReVerbRelationExtractor

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.Extractor<ChunkedSentence,ChunkedBinaryExtraction>
      extended by edu.washington.cs.knowitall.extractor.RelationFirstNpChunkExtractor
          extended by edu.washington.cs.knowitall.extractor.ReVerbRelationExtractor
Direct Known Subclasses:
R2A2, ReVerbExtractor

public abstract class ReVerbRelationExtractor
extends RelationFirstNpChunkExtractor


Field Summary
static String LONG_RELATION_PATTERN
          The pattern (V(W*P)?)+
static String PREP
          Definition of the "preposition" part of the relation pattern.
static String SHORT_RELATION_PATTERN
          The pattern (VP?)+
static String VERB
          Definition of the "verb" of the relation pattern.
static String WORD
          Definition of the "non-verb/prep" part of the relation pattern.
 
Fields inherited from class edu.washington.cs.knowitall.extractor.RelationFirstNpChunkExtractor
allowUnary, arg1Extr, arg2Extr, relExtr
 
Constructor Summary
ReVerbRelationExtractor()
          Constructs a new extractor using the default relation pattern, relation mappers, and argument mappers.
ReVerbRelationExtractor(int minFreq, boolean useLexSynConstraints, boolean mergeOverlapRels, boolean allowUnary)
          Constructs a new extractor using the default relation pattern, relation mappers, and argument mappers.
 
Method Summary
 Iterable<ChunkedBinaryExtraction> extractFromHtml(String html)
          Extracts from the given html using the default sentence reader returned by DefaultObjects#.getDefaultSentenceReaderHtml(java.io.Reader).
 Iterable<ChunkedBinaryExtraction> extractFromString(String text)
          Extracts from the given text using the default sentence reader returned by DefaultObjects.getDefaultSentenceReader(java.io.Reader).
protected abstract  void initializeArgumentExtractors()
           
protected  void initializeRelationExtractor()
          Wrapper for default initialization of the reverb relation extractor.
protected  void initializeRelationExtractor(int minFreq, boolean useLexSynConstraints, boolean mergeOverlapRels, boolean allowUnary)
          Initialize relation extractor.
 
Methods inherited from class edu.washington.cs.knowitall.extractor.RelationFirstNpChunkExtractor
extractCandidates, getArgument1Extractor, getArgument2Extractor, getRelationExtractor, setAllowUnary, setArgument1Extractor, setArgument2Extractor, setRelationExtractor
 
Methods inherited from class edu.washington.cs.knowitall.extractor.Extractor
addMapper, compose, extract, getMappers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERB

public static final String VERB
Definition of the "verb" of the relation pattern.

See Also:
Constant Field Values

WORD

public static final String WORD
Definition of the "non-verb/prep" part of the relation pattern.

See Also:
Constant Field Values

PREP

public static final String PREP
Definition of the "preposition" part of the relation pattern.

See Also:
Constant Field Values

LONG_RELATION_PATTERN

public static final String LONG_RELATION_PATTERN
The pattern (V(W*P)?)+


SHORT_RELATION_PATTERN

public static final String SHORT_RELATION_PATTERN
The pattern (VP?)+

Constructor Detail

ReVerbRelationExtractor

public ReVerbRelationExtractor()
                        throws ExtractorException
Constructs a new extractor using the default relation pattern, relation mappers, and argument mappers.

Throws:
ExtractorException - if unable to initialize the extractor

ReVerbRelationExtractor

public ReVerbRelationExtractor(int minFreq,
                               boolean useLexSynConstraints,
                               boolean mergeOverlapRels,
                               boolean allowUnary)
                        throws ExtractorException
Constructs a new extractor using the default relation pattern, relation mappers, and argument mappers.

Parameters:
minFreq - - The minimum distinct arguments to be observed in a large collection for the relation to be deemed valid.
useLexSynConstraints - - Use syntactic and lexical constraints that are part of Reverb?
mergeOverlapRels - - Merge overlapping relations?
allowUnary - - Allow relations with one argument to be output.
Throws:
ExtractorException - if unable to initialize the extractor
Method Detail

initializeArgumentExtractors

protected abstract void initializeArgumentExtractors()

initializeRelationExtractor

protected void initializeRelationExtractor()
                                    throws ExtractorException
Wrapper for default initialization of the reverb relation extractor. Use lexical and syntactic constraints, merge overlapping relations,require a minimum of 20 distinct arguments for support, and do not allow unary relations.

Throws:
ExtractorException

initializeRelationExtractor

protected void initializeRelationExtractor(int minFreq,
                                           boolean useLexSynConstraints,
                                           boolean mergeOverlapRels,
                                           boolean allowUnary)
                                    throws ExtractorException
Initialize relation extractor.

Parameters:
minFreq - - The minimum distinct arguments to be observed in a large collection for the relation to be deemed valid.
useLexSynConstraints - - Use syntactic and lexical constraints that are part of Reverb?
mergeOverlapRels - - Merge overlapping relations?
allowUnary - - Allow relations with one argument to be output.
Throws:
ExtractorException - if unable to initialize the extractor

extractFromString

public Iterable<ChunkedBinaryExtraction> extractFromString(String text)
                                                    throws ExtractorException
Extracts from the given text using the default sentence reader returned by DefaultObjects.getDefaultSentenceReader(java.io.Reader).

Parameters:
text -
Returns:
an iterable object over the extractions
Throws:
ExtractorException - if unable to extract

extractFromHtml

public Iterable<ChunkedBinaryExtraction> extractFromHtml(String html)
                                                  throws ExtractorException
Extracts from the given html using the default sentence reader returned by DefaultObjects#.getDefaultSentenceReaderHtml(java.io.Reader).

Parameters:
html -
Returns:
an iterable object over the extractions
Throws:
ExtractorException - if unable to extract


Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.