Klasse ThreadSafeTokenizerME

java.lang.Object
opennlp.tools.tokenize.ThreadSafeTokenizerME
Alle implementierten Schnittstellen:
AutoCloseable, Tokenizer

@ThreadSafe public class ThreadSafeTokenizerME extends Object implements Tokenizer, AutoCloseable
A thread-safe version of TokenizerME. Using it is completely transparent. You can use it in a single-threaded context as well, it only incurs a minimal overhead.
Siehe auch:
  • Konstruktordetails

  • Methodendetails

    • tokenize

      public String[] tokenize(String s)
      Beschreibung aus Schnittstelle kopiert: Tokenizer
      Splits a string into its atomic parts.
      Angegeben von:
      tokenize in Schnittstelle Tokenizer
      Parameter:
      s - The string to be tokenized.
      Gibt zurück:
      The String[] with the individual tokens as the array elements.
    • tokenizePos

      public Span[] tokenizePos(String s)
      Beschreibung aus Schnittstelle kopiert: Tokenizer
      Finds the boundaries of atomic parts in a string.
      Angegeben von:
      tokenizePos in Schnittstelle Tokenizer
      Parameter:
      s - The string to be tokenized.
      Gibt zurück:
      The spans (offsets into s) for each token as the individuals array elements.
    • getProbabilities

      public double[] getProbabilities()
    • close

      public void close()
      Angegeben von:
      close in Schnittstelle AutoCloseable