com.aliasi.util
Interface FeatureExtractor<E>

All Known Implementing Classes:
TokenFeatureExtractor

public interface FeatureExtractor<E>

A FeatureExtractor provides a method of converting generic input objects into feature vectors. Features themselves are represented as strings. Feature vectors are typically very sparse, so they are represented as maps from objects to numerical values. Numerical values may be any numerical type, such as Double, Float, or Integer.

For linear classifiers, it is often convenient to include a distinguished feature with a value of 1.0 as part of every vector. This will allow linear classifiers to learn offsets.

To save space, SmallObjectToDoubleMap is a useful map implementation.

Since:
LingPipe3.1
Version:
3.1
Author:
Bob Carpenter

Method Summary
 Map<String,? extends Number> features(E in)
          Return the feature vector for the specified input.
 

Method Detail

features

Map<String,? extends Number> features(E in)
Return the feature vector for the specified input.

Parameters:
in - Input object.
Returns:
The feature vector for the specified input.