Datasets:
lmqg
/

Languages:
Italian
ArXiv:
License:
asahi417 commited on
Commit
2f6faf4
1 Parent(s): 5896ef7
Files changed (1) hide show
  1. generate_reference_files.py +2 -1
generate_reference_files.py CHANGED
@@ -6,7 +6,7 @@ os.makedirs('./reference_files', exist_ok=True)
6
 
7
 
8
  for split in ['validation', 'test']:
9
- dataset = load_dataset('asahi417/qg_itquad', split=split)
10
  for data in ['question', 'answer', 'sentence', 'paragraph']:
11
  with open('./reference_files/{}-{}.txt'.format(data, split), 'w') as f:
12
  if data == 'paragraph':
@@ -17,3 +17,4 @@ for split in ['validation', 'test']:
17
 
18
  length = [len(open(i).read().split('\n')) for i in glob(f'reference_files/*{split}.txt')]
19
  assert len(list(set(length))) == 1, length
 
 
6
 
7
 
8
  for split in ['validation', 'test']:
9
+ dataset = load_dataset('asahi417/qg_itquad', split=split, download_mode='force_redownload')
10
  for data in ['question', 'answer', 'sentence', 'paragraph']:
11
  with open('./reference_files/{}-{}.txt'.format(data, split), 'w') as f:
12
  if data == 'paragraph':
 
17
 
18
  length = [len(open(i).read().split('\n')) for i in glob(f'reference_files/*{split}.txt')]
19
  assert len(list(set(length))) == 1, length
20
+ assert length[0] == len(dataset), f"{length[0]} != {len(dataset)}"