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

# Interface TokenContextGenerator

All Known Implementing Classes:
  `DefaultTokenContextGenerator`

public interface TokenContextGenerator
Interface for context generators required for `TokenizerME`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getContext(String sentence, int index)`

- ## Method Details

  - ### getContext

    String[] getContext(String sentence, int index)
    Parameters:
      `sentence` - The string that represents a sentence.
      `index` - The index to consider splitting tokens.
    Returns:
      An array of features for a `sentence` at the specified `index`.