Skip to content

Commit b16bd2e

Browse files
committed
fix: unify file read and write type
1 parent 644dc43 commit b16bd2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clean_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
thought_number = 3
1818

1919
final_thought = str(thought_number-1)
20-
with open(path, 'r') as f:
20+
with open(path, 'r', 'utf-8') as f:
2121
instances = json.load(f)
2222
Corpus = {}
2323
for instance in instances:
@@ -227,6 +227,6 @@
227227

228228
print(len(paired_data))
229229

230-
with open(file_name,'w') as f:
230+
with open(file_name,'w','utf-8') as f:
231231
f.write(json.dumps(paired_data,ensure_ascii=False,indent=4))
232232

0 commit comments

Comments
 (0)