Package opennlp.dl

Klasse AbstractDL

java.lang.Object
opennlp.dl.AbstractDL
Alle implementierten Schnittstellen:
AutoCloseable
Bekannte direkte Unterklassen:
DocumentCategorizerDL, NameFinderDL, SentenceVectorsDL

public abstract class AbstractDL extends Object implements AutoCloseable
Base class for OpenNLP deep-learning classes using ONNX Runtime.
  • Felddetails

  • Konstruktordetails

    • AbstractDL

      public AbstractDL()
  • Methodendetails

    • loadVocab

      public Map<String,Integer> loadVocab(File vocabFile) throws IOException
      Loads a vocabulary File from disk.
      Parameter:
      vocabFile - The vocabulary file.
      Gibt zurück:
      A map of vocabulary words to integer IDs.
      Löst aus:
      IOException - Thrown if the vocabulary file cannot be opened or read.
    • close

      public void close() throws ai.onnxruntime.OrtException, IllegalStateException
      Closes this resource, relinquishing any underlying resources.
      Angegeben von:
      close in Schnittstelle AutoCloseable
      Löst aus:
      ai.onnxruntime.OrtException - Thrown if it failed to close Ort resources.
      IllegalStateException - Thrown if the underlying resources were already closed.