mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Merge branch 'master' of https://github.com/explosion/spaCy
This commit is contained in:
commit
de0e6385b4
19
spacy/tests/regression/test_issue693.py
Normal file
19
spacy/tests/regression/test_issue693.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# coding: utf8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.models
|
||||
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
|
14
spacy/tests/regression/test_issue704.py
Normal file
14
spacy/tests/regression/test_issue704.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# coding: utf8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.models
|
||||
def test_issue704(EN):
|
||||
"""Test that sentence boundaries are detected correctly."""
|
||||
|
||||
text = '“Atticus said to Jem one day, “I’d rather you shot at tin cans in the backyard, but I know you’ll go after birds. Shoot all the blue jays you want, if you can hit ‘em, but remember it’s a sin to kill a mockingbird.”'
|
||||
doc = EN(text)
|
||||
sents = [sent for sent in doc.sents]
|
||||
assert len(sents) == 3
|
Loading…
Reference in New Issue
Block a user