mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-01 02:13:07 +03:00
* Fix sentence iteration bug in pos_tag example
This commit is contained in:
parent
952511a94b
commit
a9fc35d3bf
|
@ -44,7 +44,6 @@ def transform_texts(batch_id, input_, out_dir):
|
||||||
with io.open(out_loc, 'w', encoding='utf8') as file_:
|
with io.open(out_loc, 'w', encoding='utf8') as file_:
|
||||||
for text in input_:
|
for text in input_:
|
||||||
doc = nlp(text)
|
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(' '.join(represent_word(w) for w in doc if not w.is_space))
|
||||||
file_.write('\n')
|
file_.write('\n')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user