File size: 3,876 Bytes
fe36637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ba53cfb
 
fe36637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# General Constants:
LABEL_NAME = 'label'
numbers = {
    1: "first",
    2: "second",
    3: "third",
    4: "fourth",
    5: "fifth",
    6: "sixth",
    7: "seventh",
    8: "eighth",
    9: "ninth"

}
TEXT_COLUMN_NAME = [f"{numbers[i]}_sentence" for i in range(1, 10)]

# SSPabs Constants:
SSPABS = 'SSPabs'
SSPABS_TRAIN_NAME = 'train.txt'
SSPABS_VALID_NAME = 'valid.txt'
SSPABS_TEST_NAME = 'test.txt'
SSPABS_DATA_DIR = 'data/SSP/abs'
SSPABS_LABELS = {
    "0": "Does not belong to abstract",
    "1": "Belongs to abstract",
}
SSPABS_TEXT_COLUMNS = 1

# PDTB Constants:
PDTB_I = 'PDTB_I'
PDTB_E = 'PDTB_E'
PDTB_TRAIN_NAME = 'train.txt'
PDTB_VALID_NAME = 'valid.txt'
PDTB_TEST_NAME = 'test.txt'
PDTB_DATA_DIR = 'data/PDTB'
PDTB_DIRS = {PDTB_E: 'Explicit', PDTB_I: 'Implicit'}
PDTB_E_LABELS = [
    'Comparison.Concession',
    'Comparison.Contrast',
    'Contingency.Cause',
    'Contingency.Condition',
    'Contingency.Pragmatic condition',
    'Expansion.Alternative',
    'Expansion.Conjunction',
    'Expansion.Instantiation',
    'Expansion.List',
    'Expansion.Restatement',
    'Temporal.Asynchronous',
    'Temporal.Synchrony',
]
PDTB_I_LABELS = [
    'Comparison.Concession',
    'Comparison.Contrast',
    'Contingency.Cause',
    'Contingency.Pragmatic cause',
    'Expansion.Alternative',
    'Expansion.Conjunction',
    'Expansion.Instantiation',
    'Expansion.List',
    'Expansion.Restatement',
    'Temporal.Asynchronous',
    'Temporal.Synchrony',
]
PDTB_E_TEXT_COLUMNS = 2
PDTB_I_TEXT_COLUMNS = 2

# SP Constants:
SPARXIV = 'SParxiv'
SPROCSTORY = 'SProcstory'
SPWIKI = 'SPwiki'
SP_TRAIN_NAME = 'train.txt'
SP_VALID_NAME = 'valid.txt'
SP_TEST_NAME = 'test.txt'
SP_DATA_DIR = 'data/SP'
SP_DIRS = {SPARXIV: 'arxiv', SPROCSTORY: 'rocstory', SPWIKI: 'wiki'}
SP_LABELS = {
    "0": 'First sentence',
    "1": 'Second sentence',
    "2": 'Third sentence',
    "3": "Fourth sentence",
    "4": "Fifth sentence",
}
SP_TEXT_COLUMNS = 5

# BSO Constants:
BSOARXIV = 'BSOarxiv'
BSOROCSTORY = 'BSOrocstory'
BSOWIKI = 'BSOwiki'
BSO_TRAIN_NAME = 'train.txt'
BSO_VALID_NAME = 'valid.txt'
BSO_TEST_NAME = 'test.txt'
BSO_DATA_DIR = 'data/BSO'
BSO_DIRS = {BSOARXIV: 'arxiv', BSOROCSTORY: 'rocstory', BSOWIKI: 'wiki'}
BSO_LABELS = {
    "0": 'Incorrect order',
    "1": 'Correct order',
}
BSO_TEXT_COLUMNS = 2

# DC Constants:
DCCHAT = 'DCchat'
DCWIKI = 'DCwiki'
DC_TRAIN_NAME = 'train.txt'
DC_VALID_NAME = 'valid.txt'
DC_TEST_NAME = 'test.txt'
DC_DATA_DIR = 'data/DC'
DC_DIRS = {DCCHAT: 'chat', DCWIKI: 'wiki'}
DC_LABELS = {
    "0": "Incoherent",
    "1": "Coherent",
}
DC_TEXT_COLUMNS = 6

# RST Constants:
RST = 'RST'
RST_TRAIN_NAME = 'RST_TRAIN.pkl'
RST_VALID_NAME = 'RST_DEV.pkl'
RST_TEST_NAME = 'RST_TEST.pkl'
RST_DATA_DIR = 'data/RST'
RST_LABELS = [
    'NS-Explanation',
    'NS-Evaluation',
    'NN-Condition',
    'NS-Summary',
    'SN-Cause',
    'SN-Background',
    'NS-Background',
    'SN-Summary',
    'NS-Topic-Change',
    'NN-Explanation',
    'SN-Topic-Comment',
    'NS-Elaboration',
    'SN-Attribution',
    'SN-Manner-Means',
    'NN-Evaluation',
    'NS-Comparison',
    'NS-Contrast',
    'SN-Condition',
    'NS-Temporal',
    'NS-Enablement',
    'SN-Evaluation',
    'NN-Topic-Comment',
    'NN-Temporal',
    'NN-Textual-organization',
    'NN-Same-unit',
    'NN-Comparison',
    'NN-Topic-Change',
    'SN-Temporal',
    'NN-Joint',
    'SN-Enablement',
    'SN-Explanation',
    'NN-Contrast',
    'NN-Cause',
    'SN-Contrast',
    'NS-Attribution',
    'NS-Topic-Comment',
    'SN-Elaboration',
    'SN-Comparison',
    'NS-Cause',
    'NS-Condition',
    'NS-Manner-Means'
]
RST_LABELS = {key: str(i) for i, key in enumerate(RST_LABELS)}
RST_TEXT_COLUMNS = 2

DATASET_NAMES = [
    SSPABS,
    PDTB_I,
    PDTB_E,
    SPARXIV,
    SPROCSTORY,
    SPWIKI,
    BSOARXIV,
    BSOROCSTORY,
    BSOWIKI,
    DCCHAT,
    DCWIKI,
    RST,
]