Datasets:
lmqg
/

Modalities:
Text
Languages:
Japanese
ArXiv:
Libraries:
Datasets
License:
qg_jaquad / generate_reference_files.py
asahi417's picture
init
e1c267b
raw
history blame
No virus
386 Bytes
import os
from datasets import load_dataset
os.makedirs('./reference_files', exist_ok=True)
for split in ['validation', 'test']:
dataset = load_dataset('asahi417/qg_jaquad', split=split)
for data in ['question', 'answer', 'sentence', 'paragraph']:
with open('./reference_files/{}-{}.txt'.format(data, split), 'w') as f:
f.write('\n'.join(dataset[data]))