mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 09:56:28 +03:00
* Fix test_space_attachment
This commit is contained in:
parent
3683a15215
commit
b0c6daf356
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user