-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
43 lines (35 loc) · 1.08 KB
/
constants.py
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
import logging
import sys
from os import path
# Basic logging configuration
LOGGING_CONFIG = {
"stream": sys.stdout,
"format": "%(levelname)s:%(asctime)s:%(message)s",
"level": logging.INFO,
"datefmt": "%Y-%m-%d %H:%M:%S"}
# Delta tolerance to the original weat test results
WEAT_TEST_TOLERANCE = 0.03
# Delta tolerance to the original rnsb test results
RNSB_TEST_TOLERANCE = 0.0001
# Directory containing the pre-trained word vector files
WORD_VECTOR_DIR = path.join("word_vectors")
# Lower and upper score limits (in that order) of different bias metrics
BIAS_METRIC_LIMITS = {
"ect": (-1, 1),
"rnsb": (0, 1),
"weat": (-2, 2)}
# "No bias" scores of different bias metrics
BIAS_METRIC_ZERO = {
"ect": 0,
"rnsb": 0,
"weat": 0}
# Color shades (RGBA format)
COLORS = {
"blue": {
"dark": (0, 0, 1 / 255 * 115, 1.0),
"medium": (0, 0, 1.0, 0.3),
"light": (0, 0, 1.0, 0.25)},
"red": {
"dark": (1 / 255 * 139, 1 / 255 * 20, 0, 1.0),
"medium": (1.0, 1 / 255 * 20, 0, 0.25),
"light": (1.0, 1 / 255 * 20, 0, 0.1)}}