spaCy/spacy/tests/regression/test_issue781.py

13 lines
462 B
Python
Raw Normal View History

# coding: utf-8
from __future__ import unicode_literals
import pytest
# Note: "chromosomes" worked previous the bug fix
@pytest.mark.models('en')
@pytest.mark.parametrize('word,lemmas', [("chromosomes", ["chromosome"]), ("endosomes", ["endosome"]), ("colocalizes", ["colocalize", "colocaliz"])])
def test_issue781(EN, word, lemmas):
lemmatizer = EN.Defaults.create_lemmatizer()
2017-10-24 18:05:15 +03:00
assert lemmatizer(word, 'noun', morphology={'number': 'plur'}) == lemmas