spaCy/spacy/tests/regression/test_issue693.py

20 lines
615 B
Python
Raw Normal View History

2017-03-18 15:12:30 +00:00
# coding: utf8
from __future__ import unicode_literals
import pytest
2017-06-05 00:26:13 +00:00
@pytest.mark.xfail
@pytest.mark.models('en')
2017-03-18 15:12:30 +00:00
def test_issue693(EN):
"""Test that doc.noun_chunks parses the complete sentence."""
text1 = "the TopTown International Airport Board and the Goodwill Space Exploration Partnership."
text2 = "the Goodwill Space Exploration Partnership and the TopTown International Airport Board."
doc1 = EN(text1)
doc2 = EN(text2)
chunks1 = [chunk for chunk in doc1.noun_chunks]
chunks2 = [chunk for chunk in doc2.noun_chunks]
assert len(chunks1) == 2
assert len(chunks2) == 2