NameContextGenerator (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.namefind, interface: NameContextGenerator

# Interface NameContextGenerator

All Superinterfaces:
  `BeamSearchContextGenerator<String>`

All Known Implementing Classes:
  `DefaultNameContextGenerator`

public interface NameContextGenerator extends BeamSearchContextGenerator<String>
Interface for generating the context for a `name finder` by specifying a set of feature generators.

See Also:
  - `BeamSearchContextGenerator`
  - `AdaptiveFeatureGenerator`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addFeatureGenerator(AdaptiveFeatureGenerator generator)`
  Adds a feature generator.
  `void`
  `clearAdaptiveData()`
  Informs all the feature generators that the context of the adaptive data (typically a document) is no longer valid and should be cleared.
  `void`
  `updateAdaptiveData(String[] tokens, String[] outcomes)`
  Informs all the feature generators that the specified `tokens` have been classified with the corresponds set of specified `outcomes`.

  ### Methods inherited from interface BeamSearchContextGenerator

  `getContext`

- ## Method Details

  - ### addFeatureGenerator

    void addFeatureGenerator(AdaptiveFeatureGenerator generator)
    Adds a feature generator.
    Parameters:
      `generator` - The `feature generator` to add.

  - ### updateAdaptiveData

    void updateAdaptiveData(String[] tokens, String[] outcomes)
    Informs all the feature generators that the specified `tokens` have been classified with the corresponds set of specified `outcomes`.
    Parameters:
      `tokens` - The tokens of a sentence or another text unit which has been processed.
      `outcomes` - The outcomes associated with the specified `tokens`.

  - ### clearAdaptiveData

    void clearAdaptiveData()
    Informs all the feature generators that the context of the adaptive data (typically a document) is no longer valid and should be cleared.