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

# Interface LanguageDetectorContextGenerator

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `DefaultLanguageDetectorContextGenerator`

public interface LanguageDetectorContextGenerator extends Serializable
A context generator interface for `LanguageDetector`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T extends CharSequence>
  T[]`
  `getContext(CharSequence document)`
  Retrieves the contexts for a `document` using character ngrams.

- ## Method Details

  - ### getContext

    <T extends CharSequence> T[] getContext(CharSequence document)
    Retrieves the contexts for a `document` using character ngrams.
    Parameters:
      `document` - The textual input used to extract context from.
    Returns:
      An array of contexts on which a model basis its decisions.