Package opennlp.tools.util.featuregen

# Class AggregatedFeatureGenerator

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

All Implemented Interfaces:
  `AdaptiveFeatureGenerator`

public class AggregatedFeatureGenerator extends Object implements AdaptiveFeatureGenerator
The `AggregatedFeatureGenerator` aggregates a set of `feature generators` and calls them to generate the features.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AggregatedFeatureGenerator(Collection<AdaptiveFeatureGenerator> generators)`
  Initializes an `AggregatedFeatureGenerator` via specified `generators`.
  `AggregatedFeatureGenerator(AdaptiveFeatureGenerator... generators)`
  Initializes an `AggregatedFeatureGenerator` via specified `generators`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearAdaptiveData()`
  Calls the `AdaptiveFeatureGenerator.clearAdaptiveData()` method on all aggregated `feature generators`.
  `void`
  `createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes)`
  Calls the `AdaptiveFeatureGenerator.createFeatures(List, String[], int, String[])` method on all aggregated `feature generators`.
  `Collection<AdaptiveFeatureGenerator>`
  `getGenerators()`
  Retrieves a `Collections` of all aggregated `feature generators`.
  `void`
  `updateAdaptiveData(String[] tokens, String[] outcomes)`
  Calls the `AdaptiveFeatureGenerator.updateAdaptiveData(String[], String[])` method on all aggregated `feature generators`.

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

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

- ## Constructor Details

  - ### AggregatedFeatureGenerator

    public AggregatedFeatureGenerator(AdaptiveFeatureGenerator... generators)
    Initializes an `AggregatedFeatureGenerator` via specified `generators`.
    Parameters:
      `generators` - A collection of generators, `null` values are not permitted.

  - ### AggregatedFeatureGenerator

    public AggregatedFeatureGenerator(Collection<AdaptiveFeatureGenerator> generators)
    Initializes an `AggregatedFeatureGenerator` via specified `generators`.
    Parameters:
      `generators` - A collection of generators, `null` values are not permitted.

- ## Method Details

  - ### clearAdaptiveData

    public void clearAdaptiveData()
    Calls the `AdaptiveFeatureGenerator.clearAdaptiveData()` method on all aggregated `feature generators`.
    Specified by:
      `clearAdaptiveData` in interface `AdaptiveFeatureGenerator`

  - ### createFeatures

    public void createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes)
    Calls the `AdaptiveFeatureGenerator.createFeatures(List, String[], int, String[])` method on all aggregated `feature generators`.
    Specified by:
      `createFeatures` in interface `AdaptiveFeatureGenerator`
    Parameters:
      `features` - The list of features to be added to.
      `tokens` - The tokens of the sentence or other text unit being processed.
      `index` - The index of the token which is currently being processed.
      `previousOutcomes` - The outcomes for the tokens prior to the specified index.

  - ### updateAdaptiveData

    public void updateAdaptiveData(String[] tokens, String[] outcomes)
    Calls the `AdaptiveFeatureGenerator.updateAdaptiveData(String[], String[])` method on all aggregated `feature generators`.
    Specified by:
      `updateAdaptiveData` in interface `AdaptiveFeatureGenerator`
    Parameters:
      `tokens` - The tokens of the sentence or other text unit which has been processed.
      `outcomes` - The outcomes associated with the specified tokens.

  - ### getGenerators

    public Collection<AdaptiveFeatureGenerator> getGenerators()
    Retrieves a `Collections` of all aggregated `feature generators`.
    Returns:
      All aggregated generators in use.