* Fix test_space_attachment

This commit is contained in:
Matthew Honnibal 2015-10-15 03:20:51 +11:00
parent 3683a15215
commit b0c6daf356

View File

@ -7,6 +7,5 @@ def test_space_attachment(EN):
sentence = 'This is a test.\nTo ensure spaces are attached well.'
doc = EN(sentence)
for word in doc:
if word.is_space:
assert word.head.i == (word.i - 1)
for sent in doc.sents:
assert not sent[-1].is_space