Package opennlp.tools.chunker
Class ThreadSafeChunkerME
java.lang.Object
opennlp.tools.chunker.ThreadSafeChunkerME
- All Implemented Interfaces:
AutoCloseable,opennlp.tools.chunker.Chunker,opennlp.tools.ml.Probabilistic
@Deprecated(since="3.0.0")
@ThreadSafe
public class ThreadSafeChunkerME
extends Object
implements opennlp.tools.chunker.Chunker, opennlp.tools.ml.Probabilistic, AutoCloseable
Deprecated.
A thread-safe version of the
ChunkerME. Using it is completely transparent.
You can use it in a single-threaded context as well, it only incurs a minimal overhead.
Note: This class is deprecated and now delegates to a single shared
ChunkerME instance, which is thread-safe as of OPENNLP-1816.
Calling close() clears the current thread's thread-local state for compatibility.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionThreadSafeChunkerME(ChunkerModel model) Deprecated.Initializes aThreadSafeChunkerMEwith the specifiedmodel. -
Method Summary
Modifier and TypeMethodDescriptionString[]Deprecated.opennlp.tools.util.Span[]chunkAsSpans(String[] toks, String[] tags) Deprecated.voidclose()Deprecated.double[]probs()Deprecated.opennlp.tools.util.Sequence[]topKSequences(String[] sentence, String[] tags) Deprecated.opennlp.tools.util.Sequence[]topKSequences(String[] sentence, String[] tags, double minSequenceScore) Deprecated.
-
Constructor Details
-
ThreadSafeChunkerME
Deprecated.Initializes aThreadSafeChunkerMEwith the specifiedmodel.- Parameters:
model- A validChunkerModel.
-
-
Method Details
-
chunk
Deprecated.- Specified by:
chunkin interfaceopennlp.tools.chunker.Chunker
-
chunkAsSpans
Deprecated.- Specified by:
chunkAsSpansin interfaceopennlp.tools.chunker.Chunker
-
topKSequences
Deprecated.- Specified by:
topKSequencesin interfaceopennlp.tools.chunker.Chunker
-
topKSequences
public opennlp.tools.util.Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) Deprecated.- Specified by:
topKSequencesin interfaceopennlp.tools.chunker.Chunker
-
close
public void close()Deprecated.- Specified by:
closein interfaceAutoCloseable
-
probs
public double[] probs()Deprecated.- Specified by:
probsin interfaceopennlp.tools.ml.Probabilistic
-
ChunkerMEis itself thread-safe. Use it directly instead.