2017-03-13 11:58:22 +00:00
|
|
|
# coding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
2017-05-29 20:14:31 +00:00
|
|
|
@pytest.mark.models('en')
|
2017-03-18 15:16:10 +00:00
|
|
|
@pytest.mark.parametrize('text1,text2',
|
|
|
|
[("You're happy", "You are happy"),
|
|
|
|
("I'm happy", "I am happy"),
|
|
|
|
("he's happy", "he's happy")])
|
2017-03-13 11:58:22 +00:00
|
|
|
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
|