Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Commit c941ab1

Browse files
committed
fix path
1 parent 2443fd7 commit c941ab1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

prepare_wow_data.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,19 @@
3333
json.dump(total_data, open('./Wizard-of-Wikipedia/prepared_data/%s.json' % name, 'w'), indent=4, ensure_ascii=False, sort_keys=True)
3434

3535

36-
with open('dev.json', 'w') as f:
37-
data = json.load(open('valid_random_split.json')) + json.load(open('valid_topic_split.json'))
36+
with open('./Wizard-of-Wikipedia/prepared_data/dev.json', 'w') as f:
37+
data = json.load(open('./Wizard-of-Wikipedia/prepared_data/valid_random_split.json')) + \
38+
json.load(open('./Wizard-of-Wikipedia/prepared_data/valid_topic_split.json'))
3839
json.dump(data, f, ensure_ascii=False, indent=4)
3940
#os.remove('valid_random_split.json')
4041
#os.remove('valid_topic_split.json')
4142

42-
with open('test_seen.json', 'w') as f:
43-
data = json.load(open('test_random_split.json'))
43+
with open('./Wizard-of-Wikipedia/prepared_data/test_seen.json', 'w') as f:
44+
data = json.load(open('./Wizard-of-Wikipedia/prepared_data/test_random_split.json'))
4445
json.dump(data, f, ensure_ascii=False, indent=4)
4546
#os.remove('test_random_split.json')
4647

47-
with open('test_unseen.json', 'w') as f:
48-
data = json.load(open('test_topic_split.json'))
48+
with open('./Wizard-of-Wikipedia/prepared_data/test_unseen.json', 'w') as f:
49+
data = json.load(open('./Wizard-of-Wikipedia/prepared_data/test_topic_split.json'))
4950
json.dump(data, f, ensure_ascii=False, indent=4)
5051
#os.remove('test_topic_split.json')

0 commit comments

Comments
 (0)