Datasets:
Tasks:
Question Answering
Modalities:
Text
Sub-tasks:
extractive-qa
Languages:
English
Size:
10K - 100K
ArXiv:
License:
File size: 758 Bytes
96f0ff3 90f9d23 96f0ff3 90f9d23 96f0ff3 90f9d23 96f0ff3 90f9d23 |
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 |
import pandas as pd
import os
from tqdm import tqdm
import json
import shutil
directories = ['lifestyle', 'pooled', 'recreation', 'science', 'technology', 'writing'] #os.listdir()
for directory in directories:
for file_type in ["dev", "test"]:
for question_type in ["qas.forum.jsonl", "qas.search.jsonl"]:
#with open('data/' + directory + "/" + file_type + "/" + question_type, 'r', encoding="utf-8") as f:
# data = json.load(f)
if not os.path.isdir(directory):
os.mkdir(directory)
#with open(directory + "/" + file_type + question_type, 'w', encoding="utf-8") as fout:
# json.dump(data, fout)
shutil.move('data/' + directory + "/" + file_type + "/" + question_type,
directory + "/" + file_type + "_" + question_type) |