E - The type of objects whose features are extracted.public class KnownFeatureExtractor<E> extends ModifiedFeatureExtractor<E> implements Serializable
KnownFeatureExtractor restricts a base feature extractor
to features contained in a set provided at construction time.
java.io.NotSerializableException.| Constructor and Description |
|---|
KnownFeatureExtractor(FeatureExtractor<? super E> baseExtractor,
Set<String> knownFeatureSet)
Construct a known feature extractor based on the specified feature
set and base extractor.
|
| Modifier and Type | Method and Description |
|---|---|
Number |
filter(String feature,
Number value)
Returns the value if the feature is in the known feature
set and
null otherwise. |
Set<String> |
knownFeatureSet()
Returns and unmodifiable view of the known feature set
for this known feature extractor.
|
featuresbaseExtractorpublic KnownFeatureExtractor(FeatureExtractor<? super E> baseExtractor, Set<String> knownFeatureSet)
knownFeatureSet - Set of known features.baseExtractor - Base feature extractor.public Number filter(String feature, Number value)
null otherwise.filter in class ModifiedFeatureExtractor<E>feature - Feature corresponding to the value.value - Value to filter.null otherwise.Copyright © 2016 Alias-i, Inc.. All rights reserved.