Skip to content

Commit

Permalink
Update data_split.py
Browse files Browse the repository at this point in the history
  • Loading branch information
husseinmozannar authored Nov 13, 2020
1 parent fc9cc48 commit 960d81c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data_helpers/data_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@


def combine_json_files(fnames):
# fnames is an array of filenames
'''
Assumes json files are in SQuAD format, i.e see https://github.com/facebookresearch/DrQA#format-b
fnames is an array of filenames
'''
combined_data = []
for fname in fnames:
with open(fname) as f:
data = json.load(f)#['data']
data = json.load(f)['data']
for article in data:
combined_data.append(article)

Expand Down

0 comments on commit 960d81c

Please sign in to comment.