From 17018750ac3ea39c4fe5a96c05db2375ecd4973e Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 13 Mar 2017 12:58:22 +0100 Subject: [PATCH] Add regression test for #717 --- spacy/tests/regression/test_issue717.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spacy/tests/regression/test_issue717.py diff --git a/spacy/tests/regression/test_issue717.py b/spacy/tests/regression/test_issue717.py new file mode 100644 index 000000000..55060c05b --- /dev/null +++ b/spacy/tests/regression/test_issue717.py @@ -0,0 +1,15 @@ +# coding: utf8 +from __future__ import unicode_literals + +import pytest + + +@pytest.mark.xfail +@pytest.mark.models +@pytest.mark.parametrize('text1,text2', [("You're happy", "You are happy")]) +def test_issue717(EN, text1, text2): + """Test that contractions are assigned the correct lemma.""" + doc1 = EN(text1) + doc2 = EN(text2) + assert doc1[1].lemma_ == doc2[1].lemma_ + assert doc1[1].lemma == doc2[1].lemma