public class BagOfWordsFeatureGenerator extends DocumentCustomFeatureGenerator
| Constructor and Description |
|---|
BagOfWordsFeatureGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearFeatureData()
Informs the feature generator that the context of the data in the context (typically a document)
is no longer valid.
|
void |
createFeatures(List<String> features,
String[] text)
Extract features from given text fragments
|
void |
init(Map<String,String> properties,
opennlp.tools.util.featuregen.FeatureGeneratorResourceProvider resourceProvider)
Initialized the Document Custom Feature Generator with defined properties and loaded resources.
|
public void createFeatures(List<String> features, String[] text)
DocumentFeatureGeneratorfeatures - the list of featurestext - the text fragments to extract features frompublic void clearFeatureData()
DocumentFeatureGeneratorpublic void init(Map<String,String> properties, opennlp.tools.util.featuregen.FeatureGeneratorResourceProvider resourceProvider) throws opennlp.tools.util.InvalidFormatException
DocumentCustomFeatureGeneratorinit in class DocumentCustomFeatureGeneratorproperties - the propertiesresourceProvider - the external resourcesopennlp.tools.util.InvalidFormatException - throws an exceptionCopyright © 2017 IXA pipes. All rights reserved.