Datasets:
Tasks:
Text Generation
Sub-tasks:
language-modeling
Languages:
Chinese
Size:
10K<n<100K
ArXiv:
Tags:
question-generation
License:
File size: 435 Bytes
87b3f07 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import json
for i in ["test.jsonl", "train.jsonl", "validation.jsonl"]:
with open(f"data/processed/{i}") as f:
tmp = [json.loads(l) for l in f.read().split("\n") if len(l) > 0]
print(len(tmp))
for x in tmp:
x["paragraph_question"] = f"question: {x['question']}, context: {x['paragraph']}"
input()
with open(f"data/processed/{i}", "w") as f:
f.write("\n".join([json.dumps(x) for x in tmp]))
|