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

# Interface LanguageDetector

All Known Implementing Classes:
  `LanguageDetectorME, ThreadSafeLanguageDetectorME`

public interface LanguageDetector
The interface for `LanguageDetector` which predicts the `Language` for a context.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getSupportedLanguages()`
  `Language`
  `predictLanguage(CharSequence content)`
  Predicts the `Language` for the full `content` length.
  `Language[]`
  `predictLanguages(CharSequence content)`
  Predicts the `languages` for the full `content` length.

- ## Method Details

  - ### predictLanguages

    Language[] predictLanguages(CharSequence content)
    Predicts the `languages` for the full `content` length.
    Parameters:
      `content` - The textual content to detect potential `languages` from.
    Returns:
      the predicted languages

  - ### predictLanguage

    Language predictLanguage(CharSequence content)
    Predicts the `Language` for the full `content` length.
    Parameters:
      `content` - The textual content to detect potential `languages` from.
    Returns:
      the language with the highest confidence

  - ### getSupportedLanguages

    String[] getSupportedLanguages()
    Returns:
      Retrieves an array of language (codes) that are supported by a `LanguageDetector`.