Klasse ThreadSafePOSTaggerME

java.lang.Object
opennlp.tools.postag.ThreadSafePOSTaggerME
Alle implementierten Schnittstellen:
AutoCloseable, POSTagger

@ThreadSafe public class ThreadSafePOSTaggerME extends Object implements POSTagger, AutoCloseable
A thread-safe version of the POSTaggerME. 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

    • tag

      public String[] tag(String[] sentence)
      Beschreibung aus Schnittstelle kopiert: POSTagger
      Assigns the sentence of tokens pos tags.
      Angegeben von:
      tag in Schnittstelle POSTagger
      Parameter:
      sentence - The sentence of tokens to be tagged.
      Gibt zurück:
      An array of pos tags for each token provided in sentence.
    • tag

      public String[] tag(String[] sentence, Object[] additionaContext)
      Beschreibung aus Schnittstelle kopiert: POSTagger
      Assigns the sentence of tokens pos tags.
      Angegeben von:
      tag in Schnittstelle POSTagger
      Parameter:
      sentence - The sentence of tokens to be tagged.
      additionaContext - The context to provide additional information with.
      Gibt zurück:
      An array of pos tags for each token provided in sentence.
    • topKSequences

      public Sequence[] topKSequences(String[] sentence)
      Beschreibung aus Schnittstelle kopiert: POSTagger
      Assigns the sentence the top-k sequences.
      Angegeben von:
      topKSequences in Schnittstelle POSTagger
      Parameter:
      sentence - The sentence of tokens to be tagged.
      Gibt zurück:
      An array of sequences for each token provided in sentence.
    • topKSequences

      public Sequence[] topKSequences(String[] sentence, Object[] additionaContext)
      Beschreibung aus Schnittstelle kopiert: POSTagger
      Assigns the sentence the top-k sequences.
      Angegeben von:
      topKSequences in Schnittstelle POSTagger
      Parameter:
      sentence - The sentence of tokens to be tagged.
      additionaContext - The context to provide additional information with.
      Gibt zurück:
      An array of sequences for each token provided in sentence.
    • close

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