From efe41d4e1fb582dd6a8e946c3e55f3d0980e6576 Mon Sep 17 00:00:00 2001 From: Nisarg Jhaveri Date: Sun, 12 Nov 2017 15:53:57 +0530 Subject: [PATCH] Fix error in tokenization option --only-word --- polyglot/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polyglot/__main__.py b/polyglot/__main__.py index c8c47a3..3f35145 100755 --- a/polyglot/__main__.py +++ b/polyglot/__main__.py @@ -123,12 +123,12 @@ def segment(args): if args.only_sent: for l in args.input: seq = Sequence(l) - if not seq.empty(): _print(s_tokenizer.transform(seq)) + if not seq.empty(): _print(u'\n'.join(s_tokenizer.transform(seq))) elif args.only_word: for l in args.input: seq = Sequence(l) - if not seq.empty(): _print(w_tokenizer.transform(seq)) + if not seq.empty(): _print(u' '.join(w_tokenizer.transform(seq))) else: for l in args.input: