mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Added failing test for Issue #1207.
The noun chunk iterator should work for `Doc` but not for `Span`.
This commit is contained in:
parent
c3051e95f7
commit
b818afaa0e
13
spacy/tests/regression/test_issue1207.py
Normal file
13
spacy/tests/regression/test_issue1207.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.models('en')
|
||||
def test_issue1207(EN):
|
||||
text = 'Employees are recruiting talented staffers from overseas.'
|
||||
doc = EN(text)
|
||||
|
||||
assert [i.text for i in doc.noun_chunks] == ['Employees', 'talented staffers']
|
||||
sent = list(doc.sents)[0]
|
||||
assert [i.text for i in sent.noun_chunks] == ['Employees', 'talented staffers']
|
Loading…
Reference in New Issue
Block a user