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

## Uses of Class
opennlp.tools.namefind.NameSample

- Packages that use NameSample
  Package | Description
  --- | ---
  opennlp.tools.cmdline.namefind |
  opennlp.tools.formats | Experimental package related to converting various corpora to OpenNLP Format.
  opennlp.tools.formats.ad |
  opennlp.tools.formats.brat |
  opennlp.tools.formats.convert |
  opennlp.tools.formats.muc |
  opennlp.tools.formats.ontonotes |
  opennlp.tools.namefind | Package related to finding proper names and numeric amounts.

- - ### Uses of NameSample in opennlp.tools.cmdline.namefind

    Methods in opennlp.tools.cmdline.namefind that return NameSample
    Modifier and Type | Method and Description
    --- | ---
    `NameSample` | NameSampleCountersStream.`read()`

    Methods in opennlp.tools.cmdline.namefind with parameters of type NameSample
    Modifier and Type | Method and Description
    --- | ---
    `protected Span[]` | TokenNameFinderDetailedFMeasureListener.`asSpanArray(NameSample sample)`
    `void` | TokenNameFinderFineGrainedReportListener.`correctlyClassified(NameSample reference, NameSample prediction)`
    `void` | NameEvaluationErrorListener.`missclassified(NameSample reference, NameSample prediction)`
    `void` | TokenNameFinderFineGrainedReportListener.`missclassified(NameSample reference, NameSample prediction)`

    Constructor parameters in opennlp.tools.cmdline.namefind with type arguments of type NameSample
    Constructor and Description
    `NameSampleCountersStream(ObjectStream<NameSample> samples)`

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

    Methods in opennlp.tools.formats that return NameSample
    Modifier and Type | Method and Description
    --- | ---
    `NameSample` | Conll03NameSampleStream.`read()`
    `NameSample` | Conll02NameSampleStream.`read()`
    `NameSample` | BioNLP2004NameSampleStream.`read()`
    `NameSample` | EvalitaNameSampleStream.`read()`

    Methods in opennlp.tools.formats that return types with arguments of type NameSample
    Modifier and Type | Method and Description
    --- | ---
    `ObjectStream<NameSample>` | Conll02NameSampleStreamFactory.`create(String[] args)`
    `ObjectStream<NameSample>` | BioNLP2004NameSampleStreamFactory.`create(String[] args)`
    `ObjectStream<NameSample>` | NameSampleDataStreamFactory.`create(String[] args)`
    `ObjectStream<NameSample>` | EvalitaNameSampleStreamFactory.`create(String[] args)`
    `ObjectStream<NameSample>` | Conll03NameSampleStreamFactory.`create(String[] args)`

  - ### Uses of NameSample in opennlp.tools.formats.ad

    Methods in opennlp.tools.formats.ad that return NameSample
    Modifier and Type | Method and Description
    --- | ---
    `NameSample` | ADNameSampleStream.`read()`

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

  - ### Uses of NameSample in opennlp.tools.formats.brat

    Methods in opennlp.tools.formats.brat that return types with arguments of type NameSample
    Modifier and Type | Method and Description
    --- | ---
    `ObjectStream<NameSample>` | BratNameSampleStreamFactory.`create(String[] args)`
    `List<NameSample>` | BratDocumentParser.`parse(BratDocument sample)`
    `protected List<NameSample>` | BratNameSampleStream.`read(BratDocument sample)`

  - ### Uses of NameSample in opennlp.tools.formats.convert

    Methods in opennlp.tools.formats.convert with parameters of type NameSample
    Modifier and Type | Method and Description
    --- | ---
    `protected String[]` | NameToSentenceSampleStream.`toSentence(NameSample sample)`

    Constructor parameters in opennlp.tools.formats.convert with type arguments of type NameSample
    Constructor and Description
    `NameToSentenceSampleStream(Detokenizer detokenizer, ObjectStream<NameSample> samples, int chunkSize)`
    `NameToTokenSampleStream(Detokenizer detokenizer, ObjectStream<NameSample> samples)`

  - ### Uses of NameSample in opennlp.tools.formats.muc

    Methods in opennlp.tools.formats.muc that return NameSample
    Modifier and Type | Method and Description
    --- | ---
    `NameSample` | MucNameSampleStream.`read()`

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

    Constructor parameters in opennlp.tools.formats.muc with type arguments of type NameSample
    Constructor and Description
    `MucNameContentHandler(Tokenizer tokenizer, List<NameSample> storedSamples)`

  - ### Uses of NameSample in opennlp.tools.formats.ontonotes

    Methods in opennlp.tools.formats.ontonotes that return NameSample
    Modifier and Type | Method and Description
    --- | ---
    `NameSample` | OntoNotesNameSampleStream.`read()`

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

  - ### Uses of NameSample in opennlp.tools.namefind

    Methods in opennlp.tools.namefind that return NameSample
    Modifier and Type | Method and Description
    --- | ---
    `static NameSample` | NameSample.`parse(String taggedTokens, boolean isClearAdaptiveData)`
    `static NameSample` | NameSample.`parse(String taggedTokens, String defaultType, boolean isClearAdaptiveData)`
    `protected NameSample` | TokenNameFinderEvaluator.`processSample(NameSample reference)` Evaluates the given reference `NameSample` object.
    `NameSample` | NameSampleTypeFilter.`read()`
    `NameSample` | NameSampleDataStream.`read()`

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

    Method parameters in opennlp.tools.namefind with type arguments of type NameSample
    Modifier and Type | Method and Description
    --- | ---
    `void` | TokenNameFinderCrossValidator.`evaluate(ObjectStream<NameSample> samples, int nFolds)` Starts the evaluation.
    `static TokenNameFinderModel` | NameFinderME.`train(String languageCode, String type, ObjectStream<NameSample> samples, TrainingParameters trainParams, TokenNameFinderFactory factory)`

    Constructor parameters in opennlp.tools.namefind with type arguments of type NameSample
    Constructor and Description
    `NameFinderEventStream(ObjectStream<NameSample> dataStream)`
    `NameFinderEventStream(ObjectStream<NameSample> dataStream, String type, NameContextGenerator contextGenerator, SequenceCodec<String> codec)` Creates a new name finder event stream using the specified data stream and context generator.
    `NameSampleSequenceStream(ObjectStream<NameSample> psi)`
    `NameSampleSequenceStream(ObjectStream<NameSample> psi, AdaptiveFeatureGenerator featureGen)`
    `NameSampleSequenceStream(ObjectStream<NameSample> psi, AdaptiveFeatureGenerator featureGen, boolean useOutcomes)`
    `NameSampleSequenceStream(ObjectStream<NameSample> psi, NameContextGenerator pcg)`
    `NameSampleSequenceStream(ObjectStream<NameSample> psi, NameContextGenerator pcg, boolean useOutcomes)`
    `NameSampleSequenceStream(ObjectStream<NameSample> psi, NameContextGenerator pcg, boolean useOutcomes, SequenceCodec<String> seqCodec)`
    `NameSampleTypeFilter(Set<String> types, ObjectStream<NameSample> samples)`
    `NameSampleTypeFilter(String[] types, ObjectStream<NameSample> samples)`

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