com.aliasi.features
Class FeatureExtractorFilter<E>

java.lang.Object
  extended by com.aliasi.features.FeatureExtractorFilter<E>
Type Parameters:
E - The type of objects whose features are extracted.
All Implemented Interfaces:
FeatureExtractor<E>
Direct Known Subclasses:
CacheFeatureExtractor, LengthNormFeatureExtractor, ModifiedFeatureExtractor, ZScoreFeatureExtractor

public class FeatureExtractorFilter<E>
extends Object
implements FeatureExtractor<E>

A FeatureExtractorFilter contains a reference to another feature extractor. The typical use is as a superclass of a feature extractor that modifies a base feature extractor in some way.

Since:
Lingpipe3.8
Version:
3.8
Author:
Bob Carpenter

Constructor Summary
FeatureExtractorFilter(FeatureExtractor<? super E> extractor)
          Construct a feature extractor filter from the specified feature extractor.
 
Method Summary
 FeatureExtractor<? super E> baseExtractor()
          Returns the contained feature extractor.
 Map<String,? extends Number> features(E in)
          Return the features extracted by the contained feature extractor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureExtractorFilter

public FeatureExtractorFilter(FeatureExtractor<? super E> extractor)
Construct a feature extractor filter from the specified feature extractor.

Parameters:
extractor - Contained feature extractor.
Method Detail

features

public Map<String,? extends Number> features(E in)
Return the features extracted by the contained feature extractor.

Specified by:
features in interface FeatureExtractor<E>
Parameters:
in - Input to be converted to a feature vector.
Returns:
The map representing the feature vector for the input object.

baseExtractor

public FeatureExtractor<? super E> baseExtractor()
Returns the contained feature extractor.

Returns:
The contained feature extractor.