public class BagOfWordsFeatureExtractor extends Object implements FeatureExtractor<SparseFloatFV,List<String>>
SparseFloatFV instances for a list of words.
This is a simple unweighted count.| Constructor and Description |
|---|
BagOfWordsFeatureExtractor(List<String> dictionary)
A set of words which are used for their index and therefore feature
vector entry of a given word.
|
| Modifier and Type | Method and Description |
|---|---|
SparseFloatFV |
extractFeature(List<String> object)
Extract features from an object and return them.
|
public BagOfWordsFeatureExtractor(List<String> dictionary)
dictionary - public SparseFloatFV extractFeature(List<String> object)
FeatureExtractorextractFeature in interface FeatureExtractor<SparseFloatFV,List<String>>object - the object to extract from