spaCy/spacy/tests/lang/ro/test_lemmatizer.py
2019-09-29 17:32:12 +02:00

19 lines
401 B
Python

# coding: utf-8
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize(
"string,lemma",
[
("câini", "câine"),
("expedițiilor", "expediție"),
("pensete", "pensetă"),
("erau", "fi"),
],
)
def test_ro_lemmatizer_lookup_assigns(ro_tokenizer, string, lemma):
tokens = ro_tokenizer(string)
assert tokens[0].lemma_ == lemma