spaCy/tests/lang/sv/test_lemmatizer.py
Ines Montani c9cd516d96 Move tests out of package (#4334)
* Move tests out of package

* Fix typo
2019-09-28 18:05:00 +02:00

21 lines
531 B
Python

# coding: utf-8
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize(
"string,lemma",
[
("DNA-profilernas", "DNA-profil"),
("Elfenbenskustens", "Elfenbenskusten"),
("abortmotståndarens", "abortmotståndare"),
("kolesterols", "kolesterol"),
("portionssnusernas", "portionssnus"),
("åsyns", "åsyn"),
],
)
def test_lemmatizer_lookup_assigns(sv_tokenizer, string, lemma):
tokens = sv_tokenizer(string)
assert tokens[0].lemma_ == lemma