OfekGlick commited on
Commit
360ee90
1 Parent(s): 533365c

Upload 2 files

Browse files
Files changed (2) hide show
  1. DiscoEval.py +14 -4
  2. constants.py +5 -5
DiscoEval.py CHANGED
@@ -190,16 +190,26 @@ class DiscoEvalSentence(datasets.GeneratorBasedBuilder):
190
  train_url = hf_hub_download(
191
  repo_id="OfekGlick/DiscoEval",
192
  filename=constants.SP_TRAIN_NAME,
193
- subfolder=subfolder)
 
 
 
 
194
  valid_url = hf_hub_download(
195
  repo_id="OfekGlick/DiscoEval",
196
  filename=constants.SP_VALID_NAME,
197
- subfolder=subfolder)
 
 
 
198
  text_url = hf_hub_download(
199
  repo_id="OfekGlick/DiscoEval",
200
  filename=constants.SP_TEST_NAME,
201
- subfolder=subfolder)
202
- data_dir = dl_manager.download_and_extract(urls)
 
 
 
203
  train_name = constants.SP_TRAIN_NAME
204
  valid_name = constants.SP_VALID_NAME
205
  test_name = constants.SP_TEST_NAME
 
190
  train_url = hf_hub_download(
191
  repo_id="OfekGlick/DiscoEval",
192
  filename=constants.SP_TRAIN_NAME,
193
+ subfolder=subfolder,
194
+ repo_type="dataset",
195
+ local_dir='./',
196
+ )
197
+
198
  valid_url = hf_hub_download(
199
  repo_id="OfekGlick/DiscoEval",
200
  filename=constants.SP_VALID_NAME,
201
+ subfolder=subfolder,
202
+ repo_type="dataset",
203
+ local_dir='./',
204
+ )
205
  text_url = hf_hub_download(
206
  repo_id="OfekGlick/DiscoEval",
207
  filename=constants.SP_TEST_NAME,
208
+ subfolder=subfolder,
209
+ repo_type="dataset",
210
+ local_dir='./',
211
+ )
212
+ # data_dir = dl_manager.download_and_extract(urls)
213
  train_name = constants.SP_TRAIN_NAME
214
  valid_name = constants.SP_VALID_NAME
215
  test_name = constants.SP_TEST_NAME
constants.py CHANGED
@@ -7,7 +7,7 @@ SSPABS = 'SSPabs'
7
  SSPABS_TRAIN_NAME = 'train.txt'
8
  SSPABS_VALID_NAME = 'valid.txt'
9
  SSPABS_TEST_NAME = 'test.txt'
10
- SSPABS_DATA_DIR = 'data/SSP/abs/'
11
  SSPABS_LABELS = ["0", "1"]
12
  SSPABS_TEXT_COLUMNS = 1
13
 
@@ -17,7 +17,7 @@ PDTB_E = 'PDTB-E'
17
  PDTB_TRAIN_NAME = 'train.txt'
18
  PDTB_VALID_NAME = 'valid.txt'
19
  PDTB_TEST_NAME = 'test.txt'
20
- PDTB_DATA_DIR = 'data/PDTB/'
21
  PDTB_DIRS = {PDTB_E: 'Explicit/', PDTB_I: 'Implicit/'}
22
  PDTB_E_LABELS = [
23
  'Comparison.Concession',
@@ -57,7 +57,7 @@ SPWIKI = 'SPwiki'
57
  SP_TRAIN_NAME = 'train.txt'
58
  SP_VALID_NAME = 'valid.txt'
59
  SP_TEST_NAME = 'test.txt'
60
- SP_DATA_DIR = 'data/SP/'
61
  SP_DIRS = {SPARXIV: 'arxiv/', SPROCSTORY: 'rocstory/', SPWIKI: 'wiki/'}
62
  SP_LABELS = ["0", "1", "2", "3", "4"]
63
  SP_TEXT_COLUMNS = 5
@@ -68,7 +68,7 @@ DCWIKI = 'DCwiki'
68
  DC_TRAIN_NAME = 'train.txt'
69
  DC_VALID_NAME = 'valid.txt'
70
  DC_TEST_NAME = 'test.txt'
71
- DC_DATA_DIR = 'data/DC/'
72
  DC_DIRS = {DCCHAT: 'chat/', DCWIKI: 'wiki/'}
73
  DC_LABELS = ["0", "1"]
74
  DC_TEXT_COLUMNS = 6
@@ -79,7 +79,7 @@ RST = 'RST'
79
  RST_TRAIN_NAME = 'RST_TRAIN.pkl'
80
  RST_VALID_NAME = 'RST_DEV.pkl'
81
  RST_TEST_NAME = 'RST_TEST.pkl'
82
- RST_DATA_DIR = 'data/RST/'
83
  RST_LABELS = [
84
  'NS-Explanation',
85
  'NS-Evaluation',
 
7
  SSPABS_TRAIN_NAME = 'train.txt'
8
  SSPABS_VALID_NAME = 'valid.txt'
9
  SSPABS_TEST_NAME = 'test.txt'
10
+ SSPABS_DATA_DIR = 'data/SSP/abs'
11
  SSPABS_LABELS = ["0", "1"]
12
  SSPABS_TEXT_COLUMNS = 1
13
 
 
17
  PDTB_TRAIN_NAME = 'train.txt'
18
  PDTB_VALID_NAME = 'valid.txt'
19
  PDTB_TEST_NAME = 'test.txt'
20
+ PDTB_DATA_DIR = 'data/PDTB'
21
  PDTB_DIRS = {PDTB_E: 'Explicit/', PDTB_I: 'Implicit/'}
22
  PDTB_E_LABELS = [
23
  'Comparison.Concession',
 
57
  SP_TRAIN_NAME = 'train.txt'
58
  SP_VALID_NAME = 'valid.txt'
59
  SP_TEST_NAME = 'test.txt'
60
+ SP_DATA_DIR = 'data/SP'
61
  SP_DIRS = {SPARXIV: 'arxiv/', SPROCSTORY: 'rocstory/', SPWIKI: 'wiki/'}
62
  SP_LABELS = ["0", "1", "2", "3", "4"]
63
  SP_TEXT_COLUMNS = 5
 
68
  DC_TRAIN_NAME = 'train.txt'
69
  DC_VALID_NAME = 'valid.txt'
70
  DC_TEST_NAME = 'test.txt'
71
+ DC_DATA_DIR = 'data/DC'
72
  DC_DIRS = {DCCHAT: 'chat/', DCWIKI: 'wiki/'}
73
  DC_LABELS = ["0", "1"]
74
  DC_TEXT_COLUMNS = 6
 
79
  RST_TRAIN_NAME = 'RST_TRAIN.pkl'
80
  RST_VALID_NAME = 'RST_DEV.pkl'
81
  RST_TEST_NAME = 'RST_TEST.pkl'
82
+ RST_DATA_DIR = 'data/RST'
83
  RST_LABELS = [
84
  'NS-Explanation',
85
  'NS-Evaluation',