-
Notifications
You must be signed in to change notification settings - Fork 30
/
config.py
136 lines (120 loc) · 4.65 KB
/
config.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
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
134
135
136
import os
import torch
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print("Running on:{}".format(DEVICE))
BASE_PATH = os.path.dirname(os.path.abspath(__file__))
TRAINED_PATH = os.path.join(BASE_PATH, "trained")
EXPS_PATH = os.path.join(BASE_PATH, "out/experiments")
ATT_PATH = os.path.join(BASE_PATH, "out/attentions")
DATA_DIR = os.path.join(BASE_PATH, 'datasets')
class TASK1(object):
E_C = {
'train': os.path.join(DATA_DIR, 'task1/E-c/E-c-En-train.txt'),
'dev': os.path.join(DATA_DIR, 'task1/E-c/E-c-En-dev.txt'),
'gold': os.path.join(DATA_DIR, 'task1/E-c/E-c-En-test-gold.txt')
}
EI_oc = {
'anger': {
'train': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-anger-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-anger-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-anger-test-gold.txt')
},
'fear': {
'train': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-fear-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-fear-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-fear-test-gold.txt')
},
'sadness': {
'train': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-sadness-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-sadness-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-sadness-test-gold.txt')
},
'joy': {
'train': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-joy-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-joy-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-oc/EI-oc-En-joy-test-gold.txt')
}
}
EI_reg = {
'anger': {
'train': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-anger-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-anger-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-anger-test-gold.txt')
},
'fear': {
'train': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-fear-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-fear-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-fear-test-gold.txt')
},
'sadness': {
'train': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-sadness-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-sadness-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-sadness-test-gold.txt')
},
'joy': {
'train': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-joy-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-joy-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/EI-reg/EI-reg-En-joy-test-gold.txt')
}
}
V_oc = {
'train': os.path.join(
DATA_DIR, 'task1/V-oc/Valence-oc-En-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/V-oc/Valence-oc-En-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/V-oc/Valence-oc-En-test-gold.txt'),
}
V_reg = {
'train': os.path.join(
DATA_DIR, 'task1/V-reg/Valence-reg-En-train.txt'),
'dev': os.path.join(
DATA_DIR, 'task1/V-reg/Valence-reg-En-dev.txt'),
'gold': os.path.join(
DATA_DIR, 'task1/V-reg/Valence-reg-En-test-gold.txt'),
}
class TASK2(object):
EN = os.path.join(DATA_DIR, 'task2/tweet_by_ID_25_10_2017__10_29_45.txt')
class TASK3(object):
TASK_A = os.path.join(
DATA_DIR,
'task3/train/SemEval2018-T3-train-taskA_emoji.txt')
TASK_A_TEST = os.path.join(
DATA_DIR,
'task3/test/SemEval2018-T3_input_test_taskA_emoji.txt')
TASK_A_GOLD = os.path.join(
DATA_DIR,
'task3/gold/SemEval2018-T3_gold_test_taskA_emoji.txt')
TASK_B = os.path.join(
DATA_DIR,
'task3/train/SemEval2018-T3-train-taskB_emoji.txt')
TASK_B_TEST = os.path.join(
DATA_DIR,
'task3/test/SemEval2018-T3_input_test_taskB_emoji.txt')
TASK_B_GOLD = os.path.join(
DATA_DIR,
'task3/gold/SemEval2018-T3_gold_test_taskB_emoji.txt')