FEATURE - Type of featureOBJECT - Type of objectpublic class CachingFeatureExtractor<FEATURE,OBJECT extends Identifiable> extends Object implements FeatureExtractor<FEATURE,OBJECT>
HashMap. If a feature has already been generated for a given
object, it will be re-read from the HashMap| Constructor and Description |
|---|
CachingFeatureExtractor(FeatureExtractor<FEATURE,OBJECT> extractor)
Construct the cache
HashMap. |
CachingFeatureExtractor(FeatureExtractor<FEATURE,OBJECT> extractor,
boolean force)
Construct the cache
HashMap The given extractor will be used to
generate the features. |
| Modifier and Type | Method and Description |
|---|---|
FEATURE |
extractFeature(OBJECT object)
Extract features from an object and return them.
|
String |
toString() |
public CachingFeatureExtractor(FeatureExtractor<FEATURE,OBJECT> extractor)
HashMap. The given extractor will be used to
generate the features.extractor - the feature extractorpublic CachingFeatureExtractor(FeatureExtractor<FEATURE,OBJECT> extractor, boolean force)
HashMap The given extractor will be used to
generate the features. Optionally, all features can be regenerated.extractor - the feature extractorforce - if true, then all features will be regenerated and saved,
rather than being loaded.public FEATURE extractFeature(OBJECT object)
FeatureExtractorextractFeature in interface FeatureExtractor<FEATURE,OBJECT extends Identifiable>object - the object to extract from