Fix joex config for nix package

This commit is contained in:
Eike Kettner 2021-01-23 17:33:34 +01:00
parent 189f202b21
commit 98aa3423c1

View File

@ -66,7 +66,6 @@ let
preview = { preview = {
dpi = 32; dpi = 32;
}; };
ocr = { ocr = {
max-image-size = 14000000; max-image-size = 14000000;
page-range = { page-range = {
@ -97,10 +96,11 @@ let
}; };
}; };
text-analysis = { text-analysis = {
max-length = 10000; max-length = 5000;
nlp = { nlp = {
mode = "full"; mode = "full";
clear-interval = "15 minutes"; clear-interval = "15 minutes";
max-due-date-years = 10;
regex-ner = { regex-ner = {
max-entries = 1000; max-entries = 1000;
file-cache-time = "1 minute"; file-cache-time = "1 minute";
@ -108,7 +108,7 @@ let
}; };
classification = { classification = {
enabled = true; enabled = true;
item-count = 0; item-count = 600;
classifiers = [ classifiers = [
{ "useSplitWords" = "true"; { "useSplitWords" = "true";
"splitWordsTokenizerRegexp" = ''[\p{L}][\p{L}0-9]*|(?:\$ ?)?[0-9]+(?:\.[0-9]{2})?%?|\s+|.''; "splitWordsTokenizerRegexp" = ''[\p{L}][\p{L}0-9]*|(?:\$ ?)?[0-9]+(?:\.[0-9]{2})?%?|\s+|.'';
@ -123,9 +123,6 @@ let
}; };
working-dir = "/tmp/docspell-analysis"; working-dir = "/tmp/docspell-analysis";
}; };
processing = {
max-due-date-years = 10;
};
convert = { convert = {
chunk-size = 524288; chunk-size = 524288;
converted-filename-part = "converted"; converted-filename-part = "converted";
@ -816,6 +813,15 @@ in {
''; '';
}; };
max-due-date-years = mkOption {
type = types.int;
default = defaults.processing.max-due-date-years;
description = ''
Restricts proposalsfor due dates. Only dates earlier than this
number of years in the future are considered.
'';
};
clear-interval = mkOption { clear-interval = mkOption {
type = types.str; type = types.str;
default = defaults.text-analysis.nlp.clear-interval; default = defaults.text-analysis.nlp.clear-interval;
@ -828,7 +834,7 @@ in {
regex-ner = mkOption { regex-ner = mkOption {
type = types.submodule({ type = types.submodule({
options = { options = {
enabled = mkOption { max-entries = mkOption {
type = types.int; type = types.int;
default = defaults.text-analysis.regex-ner.max-entries; default = defaults.text-analysis.regex-ner.max-entries;
description = '' description = ''
@ -925,23 +931,6 @@ in {
description = "Settings for text analysis"; description = "Settings for text analysis";
}; };
processing = mkOption {
type = types.submodule({
options = {
max-due-date-years = mkOption {
type = types.int;
default = defaults.processing.max-due-date-years;
description = ''
Restricts proposals for due dates. Only dates earlier than this
number of years in the future are considered.
'';
};
};
});
default = defaults.processing;
description = "General config for processing documents";
};
convert = mkOption { convert = mkOption {
type = types.submodule({ type = types.submodule({
options = { options = {