spaCy/spacy/tests/regression/test_issue1305.py

11 lines
304 B
Python
Raw Normal View History

import pytest
2017-10-24 18:05:15 +03:00
import spacy
2017-10-25 15:44:00 +03:00
@pytest.mark.models('en')
2017-10-24 18:05:15 +03:00
def test_issue1305():
'''Test lemmatization of English VBZ'''
2017-10-24 18:05:15 +03:00
nlp = spacy.load('en_core_web_sm')
assert nlp.vocab.morphology.lemmatizer('works', 'verb') == ['work']
doc = nlp(u'This app works well')
assert doc[2].lemma_ == 'work'