From a9fc35d3bf7a605b37696423816cd8c9d12238a2 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 5 Dec 2015 20:25:12 +0100 Subject: [PATCH] * Fix sentence iteration bug in pos_tag example --- examples/pos_tag.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/pos_tag.py b/examples/pos_tag.py index 9a6549336..a118966b0 100644 --- a/examples/pos_tag.py +++ b/examples/pos_tag.py @@ -44,9 +44,8 @@ def transform_texts(batch_id, input_, out_dir): with io.open(out_loc, 'w', encoding='utf8') as file_: for text in input_: doc = nlp(text) - for sent in doc.sents: - file_.write(' '.join(represent_word(w) for w in doc if not w.is_space)) - file_.write('\n') + file_.write(' '.join(represent_word(w) for w in doc if not w.is_space)) + file_.write('\n') def represent_word(word):