Skip to content

Commit 5710637

Browse files
committed
Add missing EOLs in token corrections
When token corrections were first added in e740f09, the EOLs were not written to the output file. Relevant comment: CODAIT/text-extensions-for-pandas#148 (comment)
1 parent cd0e001 commit 5710637

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/download_and_correct_corpus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def process_token_file(dataset_fold, dataset_file, sentence_json_file, token_edi
309309
if l in sentence_deletes[dataset_fold]:
310310
removed += 1
311311
if l in edits.index:
312-
file_lines[l-removed] = edits.at[l, 'correct_line']
312+
file_lines[l-removed] = edits.at[l, 'correct_line'] + '\n'
313313
with open(target_file, "w+") as new_file:
314314
for l in file_lines:
315315
new_file.write(l)

0 commit comments

Comments
 (0)