Class BagOfWordsFeatureGenerator

java.lang.Object
opennlp.tools.doccat.BagOfWordsFeatureGenerator
All Implemented Interfaces:
FeatureGenerator

public class BagOfWordsFeatureGenerator extends Object implements FeatureGenerator
Generates a feature for each word in a document.
  • Field Details

    • useOnlyAllLetterTokens

      private final boolean useOnlyAllLetterTokens
  • Constructor Details

    • BagOfWordsFeatureGenerator

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

      BagOfWordsFeatureGenerator(boolean useOnlyAllLetterTokens)
      Instantiates a BagOfWordsFeatureGenerator instance.
      Parameters:
      useOnlyAllLetterTokens - Whether to use only all-letter tokens, or not.
  • Method Details