forked from spraakbanken/korp-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py.template
executable file
·133 lines (101 loc) · 3.75 KB
/
config.py.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# -*- coding: utf-8 -*-
"""
Configuration file used by the main korp.py script.
Copy this file to config.py and change the settings below.
"""
# Host and port for the WSGI server
WSGI_HOST = "0.0.0.0"
WSGI_PORT = 1234
# The absolute path to the CQP binaries
CQP_EXECUTABLE = ""
CWB_SCAN_EXECUTABLE = ""
# The absolute path to the CWB registry files
CWB_REGISTRY = ""
# The default encoding for the cqp binary
CQP_ENCODING = "UTF-8"
# Locale to use when sorting
LC_COLLATE = "sv_SE.UTF-8"
# The maximum number of search results that can be returned per query (0 = no limit)
MAX_KWIC_ROWS = 0
# Number of threads to use during parallel processing
PARALLEL_THREADS = 3
# Database host and port
DBHOST = "0.0.0.0"
DBPORT = 3306
# Database name
DBNAME = ""
# Database character set (use "utf8mb4" for full Unicode)
DBCHARSET = "utf8"
# Word Picture table prefix
DBWPTABLE = "relations"
# Username and password for database access
DBUSER = ""
DBPASSWORD = ""
# Database collation for lemgram data
DBCOLLATE_LEMGRAM = "utf8_bin"
# URL to authentication server
AUTH_SERVER = ""
# Secret string used when communicating with authentication server
AUTH_SECRET = ""
# A text file with names of corpora needing authentication, one per line
PROTECTED_FILE = ""
# Cache path (optional). Script must have read and write access.
CACHE_DIR = ""
# Disk cache lifespan in minutes
CACHE_LIFESPAN = 20
# List of Memcached servers or sockets (socket paths must start with slash)
MEMCACHED_SERVERS = []
# Size of Memcached client pool
MEMCACHED_POOL_SIZE = 25
# Max number of rows from count command to cache
CACHE_MAX_STATS = 5000
# Corpus configuration directory
CORPUS_CONFIG_DIR = ""
# Set to True to enable "lab mode", potentially enabling experimental features and access to lab-only corpora
LAB_MODE = False
# Whether /corpus_config should create new presets for inlined
# attribute lists and output attribute list presets referenced by name;
# if False, attribute list presets are inlined
CORPUS_CONFIG_ATTRLIST_PRESETS = False
# Possible extra preset types in corpus and attribute definitions:
# object type -> (key in object -> configuration subdirectory), where
# object type is "corpus" or "attribute" and configuration
# subdirectory is also the top-level key for these presets in
# /corpus_config output
CORPUS_CONFIG_EXTRA_PRESETS = {
"corpus": {
"context": "contexts",
"within": "withins",
},
"attribute": {
"opts": "options",
"translation": "translations",
},
}
# Base file name for corpus configuration template files in subdirectories
# of "corpora", without a ".yaml" extension
CORPUS_CONFIG_TEMPLATE_BASENAME = "_template"
# Whether corpus results should be sorted by corpus id by default (true) or
# output in the order specified in the corpus parameter (false); this can be
# overridden with the parameter sort_corpora=true|false
SORT_CORPORA_DEFAULT = True
# List of names of plugin modules to load
PLUGINS = []
# Show plugin information in the result of the /info command: "name" = plugin
# names only, "info" = plugin information in the PLUGIN_INFO of the plugin,
# None = nothing
INFO_SHOW_PLUGINS = "info"
# korppluginlib configuration: the values here override those in
# korppluginlib.config; comment these out to use the defaults. For
# more information, see korppluginlib.config.
PLUGINLIB_CONFIG = dict(
# Packages which may contain plugins; "" for top-level modules
PACKAGES = ["korpplugins"],
# Directories to search for plugins (packages) in addition to default ones
SEARCH_PATH = [],
# What to do when a plugin is not found: "error", "warn" or "ignore"
HANDLE_NOT_FOUND = "warn",
# What to output when loading plugins: 0 = nothing, 1 = plugin names,
# 2 = plugin and plugin function names
LOAD_VERBOSITY = 1,
)