From 48fd36bf0592bc80f8a86afc2a6711a947052111 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 19 Sep 2018 14:47:27 +0200 Subject: [PATCH] Fix test for issue 27772 --- spacy/tests/regression/test_issue2772.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spacy/tests/regression/test_issue2772.py b/spacy/tests/regression/test_issue2772.py index a3ca1f825..5420b20d8 100644 --- a/spacy/tests/regression/test_issue2772.py +++ b/spacy/tests/regression/test_issue2772.py @@ -1,6 +1,5 @@ '''Test that deprojectivization doesn't mess up sentence boundaries.''' import pytest -from ...syntax.nonproj import projectivize, deprojectivize from ..util import get_doc @pytest.mark.xfail @@ -8,12 +7,7 @@ def test_issue2772(en_vocab): words = 'When we write or communicate virtually , we can hide our true feelings .'.split() # A tree with a non-projective (i.e. crossing) arc # The arcs (0, 4) and (2, 9) cross. - heads = [4, 1, 7, -1, -1, -1, 3, 2, 1, 0, 2, 1, -1, -1] + heads = [4, 1, 7, -1, -2, -1, 3, 2, 1, 0, -1, -2, -1] deps = ['dep'] * len(heads) - heads, deps = projectivize(heads, deps) doc = get_doc(en_vocab, words=words, heads=heads, deps=deps) - assert doc[0].is_sent_start == True - assert doc[1].is_sent_start is None - deprojectivize(doc) - assert doc[0].is_sent_start == True assert doc[1].is_sent_start is None