On Wed, 2017-01-11 at 11:05 +0100, Thilo Goetz wrote: > in a recent project, I was using SentenceDetectorME, TokenizerME and > POSTaggerME. It turns out that none of those is thread safe. This is > because the classification probabilities for the last tag() call > (for > example) are stored in a member variable and can be retrieved by a > separate API call.
The POSTagger already has the Sequence object to return the result with probabilties. If we would introduce a new method we can probably just deprecate the method to retrieve the probs. Should be a minor change to have an interface that can be thread safe. Then it is a matter of documentation, we can say that calling the method to retrieve the probs is not thread-safe, and one day we remove it. Ok, the interface question kind of solved, we would need to figure out how to make that fast enough so it makes sense to do this change. Jörn
