From 98c13d8aa9f51f4afe409f7ea6f730393de48308 Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 13 Mar 2017 12:28:41 +0100 Subject: [PATCH] Add regression test for #401 --- spacy/tests/regression/test_issue401.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spacy/tests/regression/test_issue401.py diff --git a/spacy/tests/regression/test_issue401.py b/spacy/tests/regression/test_issue401.py new file mode 100644 index 000000000..d3fa3c00f --- /dev/null +++ b/spacy/tests/regression/test_issue401.py @@ -0,0 +1,14 @@ +# coding: utf8 +from __future__ import unicode_literals + +import pytest + + +@pytest.mark.xfail +@pytest.mark.models +@pytest.mark.parametrize('text,i', [("Jane's got a new car", 1), + ("Jane thinks that's a nice car", 3)]) +def test_issue401(EN, text, i): + """Text that 's in contractions is not lemmatized as '.""" + tokens = EN(text) + assert tokens[i].lemma_ != "'"