-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefinitions.py
46 lines (38 loc) · 1.76 KB
/
definitions.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
44
45
46
import os
from dotenv import load_dotenv
import numpy as np
load_dotenv()
ROOT_DIR = os.path.dirname(os.path.realpath(__file__))
ENV_DIR = os.getenv('CONDA_PREFIX', os.getenv('HOME', '/'))
TEM_PARAMS = np.array([
float(os.getenv('TEM_PARAM_C', '')),
float(os.getenv('TEM_PARAM_ALPHA', '')),
float(os.getenv('TEM_PARAM_BETA', '')),
float(os.getenv('TEM_PARAM_GAMMA', '')),
float(os.getenv('TEM_PARAM_DELTA', '')),
float(os.getenv('TEM_PARAM_THETA', '')),
float(os.getenv('TEM_PARAM_MERGE', '')),
float(os.getenv('TEM_PARAM_EVOLV', ''))
])
MODELS_DIR = os.path.join(ENV_DIR, 'models')
STYLOMETRY_DIR = os.path.join(MODELS_DIR, 'stylometry')
TEGMETRICS_DIR = os.path.join(MODELS_DIR, 'teg_metrics')
# also adjust existing stanford dir to use new variable
STANFORD_DIR = os.path.join(MODELS_DIR, 'stanford-corenlp-4.5.1')
STANFORD_JARS = (
os.path.join(STANFORD_DIR, 'stanford-corenlp-4.5.1.jar'),
os.path.join(STANFORD_DIR, 'stanford-corenlp-4.5.1-models.jar'),
)
NLTK_DATA = os.path.join(ENV_DIR, 'nltk_data')
DATABASE_FILES_PATH = os.path.join(ROOT_DIR, '.database')
DATABASE_AUTHORS_PATH = os.path.join(DATABASE_FILES_PATH, 'authors.yaml')
DATABASE_GEN_PATH = os.path.join(DATABASE_FILES_PATH, 'gen.yaml')
DATABASE_TEST_PATH = os.path.join(DATABASE_FILES_PATH, 'test.yaml')
DATABASE_GERMAN_PATH = os.path.join(DATABASE_FILES_PATH, 'german.yaml')
DATABASE_GERMAN_TEST_PATH = os.path.join(DATABASE_FILES_PATH, 'german-test.yaml')
GPT_KEY = os.getenv('GPT_KEY', '')
OPENAI_ORGA = os.getenv('OPENAI_ORGA', '')
GOOGLE_API_KEY = os.getenv('GOOGLE_API_KEY', '')
WINSTON_API_KEY = os.getenv('WINSTON_API_KEY', '')
STYLE_MACHINE_CONFIDENCE = float(os.getenv('STYLE_MACHINE_CONFIDENCE', ''))
STYLE_HUMAN_CONFIDENCE = float(os.getenv('STYLE_HUMAN_CONFIDENCE', ''))