Uses of Class opennlp.tools.langdetect.LanguageSample (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

## Uses of Class
opennlp.tools.langdetect.LanguageSample

- Packages that use LanguageSample
  Package | Description
  --- | ---
  opennlp.tools.cmdline.langdetect |
  opennlp.tools.formats | Experimental package related to converting various corpora to OpenNLP Format.
  opennlp.tools.formats.leipzig |
  opennlp.tools.langdetect |

- - ### Uses of LanguageSample in opennlp.tools.cmdline.langdetect

    Methods in opennlp.tools.cmdline.langdetect with parameters of type LanguageSample
    Modifier and Type | Method and Description
    --- | ---
    `void` | LanguageDetectorFineGrainedReportListener.`correctlyClassified(LanguageSample reference, LanguageSample prediction)`
    `void` | LanguageDetectorFineGrainedReportListener.`missclassified(LanguageSample reference, LanguageSample prediction)`
    `void` | LanguageDetectorEvaluationErrorListener.`missclassified(LanguageSample reference, LanguageSample prediction)`
    `protected void` | LanguageDetectorEvaluationErrorListener.`printError(LanguageSample referenceSample, LanguageSample predictedSample)`

  - ### Uses of LanguageSample in opennlp.tools.formats

    Methods in opennlp.tools.formats that return types with arguments of type LanguageSample
    Modifier and Type | Method and Description
    --- | ---
    `ObjectStream<LanguageSample>` | LanguageDetectorSampleStreamFactory.`create(String[] args)`

  - ### Uses of LanguageSample in opennlp.tools.formats.leipzig

    Methods in opennlp.tools.formats.leipzig that return LanguageSample
    Modifier and Type | Method and Description
    --- | ---
    `LanguageSample` | LeipzigLanguageSampleStream.`read()`

    Methods in opennlp.tools.formats.leipzig that return types with arguments of type LanguageSample
    Modifier and Type | Method and Description
    --- | ---
    `ObjectStream<LanguageSample>` | LeipzigLanguageSampleStreamFactory.`create(String[] args)`

  - ### Uses of LanguageSample in opennlp.tools.langdetect

    Methods in opennlp.tools.langdetect that return LanguageSample
    Modifier and Type | Method and Description
    --- | ---
    `LanguageSample` | LanguageDetectorEvaluator.`processSample(LanguageSample sample)` Evaluates the given reference `LanguageSample` object.
    `LanguageSample` | LanguageDetectorSampleStream.`read()`

    Methods in opennlp.tools.langdetect with parameters of type LanguageSample
    Modifier and Type | Method and Description
    --- | ---
    `protected Iterator<Event>` | LanguageDetectorEventStream.`createEvents(LanguageSample sample)`
    `LanguageSample` | LanguageDetectorEvaluator.`processSample(LanguageSample sample)` Evaluates the given reference `LanguageSample` object.

    Method parameters in opennlp.tools.langdetect with type arguments of type LanguageSample
    Modifier and Type | Method and Description
    --- | ---
    `void` | LanguageDetectorCrossValidator.`evaluate(ObjectStream<LanguageSample> samples, int nFolds)` Starts the evaluation.
    `static LanguageDetectorModel` | LanguageDetectorME.`train(ObjectStream<LanguageSample> samples, TrainingParameters mlParams, LanguageDetectorFactory factory)`

    Constructor parameters in opennlp.tools.langdetect with type arguments of type LanguageSample
    Constructor and Description
    `LanguageDetectorEventStream(ObjectStream<LanguageSample> data, LanguageDetectorContextGenerator contextGenerator)` Initializes the current instance via samples and feature generators.

Copyright © 2026 The Apache Software Foundation. All rights reserved.