BagOfWordsFeatureGenerator (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.doccat, class: BagOfWordsFeatureGenerator

Package opennlp.tools.doccat

# Class BagOfWordsFeatureGenerator

java.lang.Object
opennlp.tools.doccat.BagOfWordsFeatureGenerator

All Implemented Interfaces:
  `opennlp.tools.doccat.FeatureGenerator`

public class BagOfWordsFeatureGenerator extends Object implements opennlp.tools.doccat.FeatureGenerator
Generates a feature for each word in a document.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BagOfWordsFeatureGenerator()`
  Instantiates a default `BagOfWordsFeatureGenerator` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Collection<String>`
  `extractFeatures(String[] text, Map<String,Object> extraInformation)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BagOfWordsFeatureGenerator

    public BagOfWordsFeatureGenerator()
    Instantiates a default `BagOfWordsFeatureGenerator` instance.

- ## Method Details

  - ### extractFeatures

    public Collection<String> extractFeatures(String[] text, Map<String,Object> extraInformation)
    Specified by:
      `extractFeatures` in interface `opennlp.tools.doccat.FeatureGenerator`