Skip to content

Commit 1257427

Browse files
committed
Change outputformat to be unicode (Python 2)
1 parent 580581f commit 1257427

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

morfessor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,6 +1844,8 @@ def main(argv):
18441844
if len(args.testfiles) > 0:
18451845
_logger.info("Segmenting test data...")
18461846
outformat = args.outputformat
1847+
if not PY3:
1848+
outformat = unicode(outformat)
18471849
outformat = outformat.replace(r"\n", "\n")
18481850
outformat = outformat.replace(r"\t", "\t")
18491851
with io._open_text_file_write(args.outfile) as fobj:

0 commit comments

Comments
 (0)