update the procedure of processing data
This commit is contained in:
parent
1aa21f4cc6
commit
1d1acb29b3
@ -9,3 +9,10 @@ def read_file(filename):
|
||||
with open(filename, "r", encoding="utf-8") as fin:
|
||||
return fin.readlines()
|
||||
|
||||
|
||||
def write_file(sents, filename):
|
||||
print("Writing data to {}...".format(filename))
|
||||
with open(filename, "w", encoding="utf-8") as fout:
|
||||
for sent in sents:
|
||||
fout.write(sent)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user