mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Make idle interval when clearing nlp cache configurable
This commit is contained in:
@ -276,6 +276,13 @@ docspell.joex {
|
||||
# files.
|
||||
working-dir = ${java.io.tmpdir}"/docspell-analysis"
|
||||
|
||||
# The StanfordCoreNLP library caches language models which
|
||||
# requires quite some amount of memory. Setting this interval to a
|
||||
# positive duration, the cache is cleared after this amount of
|
||||
# idle time. Set it to 0 to disable it if you have enough memory,
|
||||
# processing will be faster.
|
||||
clear-stanford-nlp-interval = "15 minutes"
|
||||
|
||||
regex-ner {
|
||||
# Whether to enable custom NER annotation. This uses the address
|
||||
# book of a collective as input for NER tagging (to automatically
|
||||
|
@ -60,6 +60,7 @@ object Config {
|
||||
case class TextAnalysis(
|
||||
maxLength: Int,
|
||||
workingDir: Path,
|
||||
clearStanfordNlpInterval: Duration,
|
||||
regexNer: RegexNer,
|
||||
classification: Classification
|
||||
) {
|
||||
@ -67,6 +68,7 @@ object Config {
|
||||
def textAnalysisConfig: TextAnalysisConfig =
|
||||
TextAnalysisConfig(
|
||||
maxLength,
|
||||
clearStanfordNlpInterval,
|
||||
TextClassifierConfig(
|
||||
workingDir,
|
||||
NonEmptyList
|
||||
|
Reference in New Issue
Block a user