From 19501f3340127c7c874e551632c36e19ba2176d3 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 25 Jan 2017 13:16:52 +0100 Subject: [PATCH] Add regression test for #775 --- spacy/tests/regression/test_issue775.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 spacy/tests/regression/test_issue775.py diff --git a/spacy/tests/regression/test_issue775.py b/spacy/tests/regression/test_issue775.py new file mode 100644 index 000000000..fe1c89240 --- /dev/null +++ b/spacy/tests/regression/test_issue775.py @@ -0,0 +1,13 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import pytest + + +@pytest.mark.parametrize('text', ["Shell", "shell"]) +def test_issue775(en_tokenizer, text): + """Test that 'Shell' and 'shell' are excluded from the contractions + generated by the English tokenizer exceptions.""" + tokens = en_tokenizer(text) + assert len(tokens) == 1 + assert tokens[0].text == text