From 58a500b3d6e43bf68ef762aedd5400c93fe7eff9 Mon Sep 17 00:00:00 2001 From: Hadrien Date: Wed, 3 Nov 2021 11:46:50 +0300 Subject: [PATCH] fix: file open mode fixed to w --- tools/conllXtostandoff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/conllXtostandoff.py b/tools/conllXtostandoff.py index 68864e12f..1d887f520 100755 --- a/tools/conllXtostandoff.py +++ b/tools/conllXtostandoff.py @@ -68,8 +68,8 @@ def output(infn, docnum, sentences): else: outfnbase = os.path.basename(infn) outfn = os.path.join(output_directory, outfnbase) - txtout = codecs.open(outfn + '.txt', 'wt', encoding=OUTPUT_ENCODING) - soout = codecs.open(outfn + '.ann', 'wt', encoding=OUTPUT_ENCODING) + txtout = codecs.open(outfn + '.txt', 'w', encoding=OUTPUT_ENCODING) + soout = codecs.open(outfn + '.ann', 'w', encoding=OUTPUT_ENCODING) offset, idnum, ridnum = 0, 1, 1