edu.washington.cs.knowitall.extractor.conf.featureset
Class TokenFeature

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.conf.featureset.ExtractionFeature
      extended by edu.washington.cs.knowitall.extractor.conf.featureset.TokenFeature
All Implemented Interfaces:
com.google.common.base.Predicate<ChunkedBinaryExtraction>

public abstract class TokenFeature
extends ExtractionFeature

Parent class for any feature that only considers the token layer.

Author:
Rob

Field Summary
 
Fields inherited from class edu.washington.cs.knowitall.extractor.conf.featureset.ExtractionFeature
stemmer
 
Constructor Summary
TokenFeature(Collection<String> givenTokens)
           
TokenFeature(String... givenTokens)
           
 
Method Summary
static ExtractionFeature anywhereAfterArg2(Collection<String> tokens)
          Get a feature that fires if any element of tokens is present at any index after arg2.
static ExtractionFeature anywhereBeforeArg1(Collection<String> tokens)
          Get a feature that fires if any element of tokens is present at any index prior to arg 1.
protected abstract  edu.washington.cs.knowitall.commonlib.Range rangeToExamine(ChunkedBinaryExtraction cbe)
           
static ExtractionFeature relationHeadVerb(Collection<String> tokens)
          Get a feature that fires if any element of tokens is present at the index of the relation's head verb.
static ExtractionFeature relSingleToken(Collection<String> tokens)
          Get a feature that fires if any element of tokens is present in a single token relation (returns empty range if relation is longer than one token).
static ExtractionFeature rightAfterArg2(String... tokens)
          Get a feature that fires if any element of tokens is present at the index immediately after arg2.
static ExtractionFeature rightBeforeArg1(Collection<String> tokens)
          Get a feature that fires if any element of tokens is present at the index immediately before arg1
static ExtractionFeature rightBeforeArg1(String... tokens)
           
protected  boolean testAtIndex(Integer index, ChunkedSentence sentence)
           
static ExtractionFeature withinArg2(String... tokens)
          Get a feature that fires if any element of tokens is present within arg2.
static ExtractionFeature withinRel(String... tokens)
          Get a feature that fires if any element of tokens is present within the relation
 
Methods inherited from class edu.washington.cs.knowitall.extractor.conf.featureset.ExtractionFeature
apply, indexOfHeadVerb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Predicate
equals
 

Constructor Detail

TokenFeature

public TokenFeature(String... givenTokens)

TokenFeature

public TokenFeature(Collection<String> givenTokens)
Method Detail

rangeToExamine

protected abstract edu.washington.cs.knowitall.commonlib.Range rangeToExamine(ChunkedBinaryExtraction cbe)
Specified by:
rangeToExamine in class ExtractionFeature

testAtIndex

protected boolean testAtIndex(Integer index,
                              ChunkedSentence sentence)
Specified by:
testAtIndex in class ExtractionFeature

withinArg2

public static ExtractionFeature withinArg2(String... tokens)
Get a feature that fires if any element of tokens is present within arg2.

Parameters:
posTags -
Returns:

withinRel

public static ExtractionFeature withinRel(String... tokens)
Get a feature that fires if any element of tokens is present within the relation

Parameters:
posTags -
Returns:

rightBeforeArg1

public static ExtractionFeature rightBeforeArg1(Collection<String> tokens)
Get a feature that fires if any element of tokens is present at the index immediately before arg1

Parameters:
posTags -
Returns:

rightBeforeArg1

public static ExtractionFeature rightBeforeArg1(String... tokens)

relationHeadVerb

public static ExtractionFeature relationHeadVerb(Collection<String> tokens)
Get a feature that fires if any element of tokens is present at the index of the relation's head verb.

Parameters:
posTags -
Returns:

rightAfterArg2

public static ExtractionFeature rightAfterArg2(String... tokens)
Get a feature that fires if any element of tokens is present at the index immediately after arg2.

Parameters:
posTags -
Returns:

anywhereBeforeArg1

public static ExtractionFeature anywhereBeforeArg1(Collection<String> tokens)
Get a feature that fires if any element of tokens is present at any index prior to arg 1.

Parameters:
posTags -
Returns:

anywhereAfterArg2

public static ExtractionFeature anywhereAfterArg2(Collection<String> tokens)
Get a feature that fires if any element of tokens is present at any index after arg2.

Parameters:
posTags -
Returns:

relSingleToken

public static ExtractionFeature relSingleToken(Collection<String> tokens)
Get a feature that fires if any element of tokens is present in a single token relation (returns empty range if relation is longer than one token).

Parameters:
posTags -
Returns:


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