What is the default number of threads in stanford-corenlp? Specifically, the named entity extractor, and then the information extractor. Also, I would like both to use a single thread for debugging purposes, how do I set this?
Thanks!
What is the default number of threads in stanford-corenlp? Specifically, the named entity extractor, and then the information extractor. Also, I would like both to use a single thread for debugging purposes, how do I set this?
Thanks!
Default is 1 thread.
There are two ways to run Stanford CoreNLP in a multi-threaded mode.
1.) each thread handles a separate document
2.) each thread handles a separate sentence
Suppose you have 4 cores.
If you want each thread to handle a separate document, use the
-threads 4
option (assuming you want to use 4).So you might run this command:
Multiple annotators can process sentences in parallel. Here is an example of setting the named entity processor to use multiple threads.
The following annotators can work on multiple sentences at the same time:
Note that while the
ner
annotator can run in multi-threaded mode, it uses several sub-annotators that cannot. So you are really only getting the statistical model run in parallel. The pattern matching rules modules do not operate in multi-threaded mode.