Package opennlp.tools.doccat
Class BagOfWordsFeatureGenerator
java.lang.Object
opennlp.tools.doccat.BagOfWordsFeatureGenerator
- All Implemented Interfaces:
- FeatureGenerator
Generates a feature for each word in a document.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionextractFeatures(String[] text, Map<String, Object> extraInformation) Extracts features from giventextfragments.
- 
Constructor Details- 
BagOfWordsFeatureGeneratorpublic BagOfWordsFeatureGenerator()Instantiates a defaultBagOfWordsFeatureGeneratorinstance.
 
- 
- 
Method Details- 
extractFeaturesDescription copied from interface:FeatureGeneratorExtracts features from giventextfragments.- Specified by:
- extractFeaturesin interface- FeatureGenerator
- Parameters:
- text- The text fragments to extract features from
- extraInformation- Optional extra information to be used by the- FeatureGenerator.
- Returns:
- A collection of features.
 
 
-