Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -68,12 +68,13 @@ if __name__ == "__main__": | ... | @@ -68,12 +68,13 @@ if __name__ == "__main__": |
| 68 | for line in iFile: | 68 | for line in iFile: |
| 69 | line = line.strip('\r\n') | 69 | line = line.strip('\r\n') |
| 70 | trainingDataset.append(line) | 70 | trainingDataset.append(line) |
| 71 | - if counter > 70 and counter <= 100: | 71 | + elif counter > 70 and counter <= 100: |
| 72 | print(" Joining file {} to test data set".format(file)) | 72 | print(" Joining file {} to test data set".format(file)) |
| 73 | with open(os.path.join(path, file), "r", encoding="utf-8", errors="replace") as iFile: | 73 | with open(os.path.join(path, file), "r", encoding="utf-8", errors="replace") as iFile: |
| 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 | + counter += 1 | ||
| 77 | with open(os.path.join(options.outputPath, options.trainingFile), "w", encoding="utf-8", errors="replace") as oFile: | 78 | with open(os.path.join(options.outputPath, options.trainingFile), "w", encoding="utf-8", errors="replace") as oFile: |
| 78 | for line in trainingDataset: | 79 | for line in trainingDataset: |
| 79 | oFile.write("{}\n".format(line)) | 80 | oFile.write("{}\n".format(line)) | ... | ... |
-
Please register or login to post a comment