Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -74,10 +74,10 @@ if __name__ == "__main__": | ... | @@ -74,10 +74,10 @@ if __name__ == "__main__": |
74 | for line in iFile: | 74 | for line in iFile: |
75 | line = line.strip('\r\n') | 75 | line = line.strip('\r\n') |
76 | testDataset.append(line) | 76 | testDataset.append(line) |
77 | - with open(os.path.join(options.outputPath, options.trainingFile), "r", encoding="utf-8", errors="replace") as oFile: | 77 | + with open(os.path.join(options.outputPath, options.trainingFile), "w", encoding="utf-8", errors="replace") as oFile: |
78 | for line in trainingDataset: | 78 | for line in trainingDataset: |
79 | oFile.write("{}\n".format(line)) | 79 | oFile.write("{}\n".format(line)) |
80 | - with open(os.path.join(options.outputPath, options.testFile), "r", encoding="utf-8", errors="replace") as oFile: | 80 | + with open(os.path.join(options.outputPath, options.testFile), "w", encoding="utf-8", errors="replace") as oFile: |
81 | for line in testDataset: | 81 | for line in testDataset: |
82 | oFile.write("{}\n".format(line)) | 82 | oFile.write("{}\n".format(line)) |
83 | 83 | ... | ... |
-
Please register or login to post a comment