Package opennlp.dl.namefinder

# Class NameFinderDL

java.lang.Object
opennlp.dl.AbstractDL
opennlp.dl.namefinder.NameFinderDL

All Implemented Interfaces:
  `AutoCloseable`, `opennlp.tools.namefind.TokenNameFinder`

public class NameFinderDL extends AbstractDL implements opennlp.tools.namefind.TokenNameFinder
An implementation of `TokenNameFinder` that uses ONNX models.

See Also:
  - `TokenNameFinder`
  - `InferenceOptions`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `B_PER`
  `static final String`
  `I_PER`
  `static final String`
  `SEPARATOR`

  ### Fields inherited from class opennlp.dl.AbstractDL

  `ATTENTION_MASK, INPUT_IDS, TOKEN_TYPE_IDS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NameFinderDL(File model, File vocabulary, Map<Integer,String> ids2Labels, InferenceOptions inferenceOptions, opennlp.tools.sentdetect.SentenceDetector sentenceDetector)`
  Instantiates a `name finder` using ONNX models.
  `NameFinderDL(File model, File vocabulary, Map<Integer,String> ids2Labels, opennlp.tools.sentdetect.SentenceDetector sentenceDetector)`
  Instantiates a `name finder` using ONNX models.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearAdaptiveData()`
  `opennlp.tools.util.Span[]`
  `find(String[] input)`

  ### Methods inherited from class opennlp.dl.AbstractDL

  `close, loadVocab`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### I_PER

    public static final String I_PER
    See Also:
      - Constant Field Values

  - ### B_PER

    public static final String B_PER
    See Also:
      - Constant Field Values

  - ### SEPARATOR

    public static final String SEPARATOR
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### NameFinderDL

    public NameFinderDL(File model, File vocabulary, Map<Integer,String> ids2Labels, opennlp.tools.sentdetect.SentenceDetector sentenceDetector) throws IOException, ai.onnxruntime.OrtException
    Instantiates a `name finder` using ONNX models.
    Parameters:
      `model` - The ONNX model file.
      `vocabulary` - The model file's vocabulary file.
      `ids2Labels` - The mapping of ids to labels.
      `sentenceDetector` - The `SentenceDetector` to be used.
    Throws:
      `ai.onnxruntime.OrtException` - Thrown if the `model` cannot be loaded.
      `IOException` - Thrown if errors occurred loading the `model` or `vocabulary`.

  - ### NameFinderDL

    public NameFinderDL(File model, File vocabulary, Map<Integer,String> ids2Labels, InferenceOptions inferenceOptions, opennlp.tools.sentdetect.SentenceDetector sentenceDetector) throws IOException, ai.onnxruntime.OrtException
    Instantiates a `name finder` using ONNX models.
    Parameters:
      `model` - The ONNX model file.
      `vocabulary` - The model file's vocabulary file.
      `ids2Labels` - The mapping of ids to labels.
      `inferenceOptions` - `InferenceOptions` to control the inference.
      `sentenceDetector` - The `SentenceDetector` to be used.
    Throws:
      `ai.onnxruntime.OrtException` - Thrown if the `model` cannot be loaded.
      `IOException` - Thrown if errors occurred loading the `model` or `vocabulary`.

- ## Method Details

  - ### find

    public opennlp.tools.util.Span[] find(String[] input)
    Specified by:
      `find` in interface `opennlp.tools.namefind.TokenNameFinder`

  - ### clearAdaptiveData

    public void clearAdaptiveData()
    Specified by:
      `clearAdaptiveData` in interface `opennlp.tools.namefind.TokenNameFinder`