Datasets:

Modalities:
Text
Formats:
json
Libraries:
Datasets
Dask
License:
en-vi-translation / join_dataset.py
kocoten1992's picture
feat: add join_dataset.py util file
10cc034
raw
history blame
333 Bytes
import os
import json
json_files = [];
for file in os.listdir():
if file.endswith('.json'):
json_files.append(file)
result = list()
for f1 in json_files:
with open(f1, 'r') as infile:
result.extend(json.load(infile))
with open('join_dataset.json', 'w') as output_file:
json.dump(result, output_file)