From 1424b12b0912e77adaf954a5f9dcd79b6a40d00c Mon Sep 17 00:00:00 2001 From: svlandeg Date: Tue, 2 Apr 2019 13:06:37 +0200 Subject: [PATCH] failing test for Issue #3449 --- spacy/tests/regression/test_issue3449.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 spacy/tests/regression/test_issue3449.py diff --git a/spacy/tests/regression/test_issue3449.py b/spacy/tests/regression/test_issue3449.py new file mode 100644 index 000000000..40aa43bb7 --- /dev/null +++ b/spacy/tests/regression/test_issue3449.py @@ -0,0 +1,22 @@ +import pytest + +from spacy.lang.en import English + + +@pytest.mark.xfail(reason="Current default suffix rules avoid one upper-case letter before a dot.") +def test_issue3449(): + nlp = English() + nlp.add_pipe(nlp.create_pipe('sentencizer')) + + text1 = "He gave the ball to I. Do you want to go to the movies with I?" + text2 = "He gave the ball to I. Do you want to go to the movies with I?" + text3 = "He gave the ball to I.\nDo you want to go to the movies with I?" + + t1 = nlp(text1) + t2 = nlp(text2) + t3 = nlp(text3) + + assert t1[5].text == 'I' + assert t2[5].text == 'I' + assert t3[5].text == 'I' +