Package opennlp.tools.util.featuregen

# Class TokenClassFeatureGenerator

java.lang.Object
opennlp.tools.util.featuregen.TokenClassFeatureGenerator

All Implemented Interfaces:
  `opennlp.tools.util.featuregen.AdaptiveFeatureGenerator`

public class TokenClassFeatureGenerator extends Object implements opennlp.tools.util.featuregen.AdaptiveFeatureGenerator
Generates features for the class of a token.

See Also:
  - `AdaptiveFeatureGenerator`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TokenClassFeatureGenerator()`
  Initalizes a `TokenClassFeatureGenerator` which won't generate the `w&c` feature per token.
  `TokenClassFeatureGenerator(boolean generateWordAndClassFeature)`
  Initalizes a `TokenClassFeatureGenerator`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `createFeatures(List<String> features, String[] tokens, int index, String[] preds)`

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

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

  ### Methods inherited from interface opennlp.tools.util.featuregen.AdaptiveFeatureGenerator

  `clearAdaptiveData, updateAdaptiveData`

- ## Constructor Details

  - ### TokenClassFeatureGenerator

    public TokenClassFeatureGenerator()
    Initalizes a `TokenClassFeatureGenerator` which won't generate the `w&c` feature per token.

  - ### TokenClassFeatureGenerator

    public TokenClassFeatureGenerator(boolean generateWordAndClassFeature)
    Initalizes a `TokenClassFeatureGenerator`.
    Parameters:
      `generateWordAndClassFeature` - If `true` the `w&c` feature will be generated per token, `false` otherwise.

- ## Method Details

  - ### createFeatures

    public void createFeatures(List<String> features, String[] tokens, int index, String[] preds)
    Specified by:
      `createFeatures` in interface `opennlp.tools.util.featuregen.AdaptiveFeatureGenerator`