2019-01-16 12:45:50 +00:00
|
|
|
# coding: utf-8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
2019-02-08 13:14:49 +00:00
|
|
|
@pytest.mark.parametrize(
|
|
|
|
"string,lemma",
|
|
|
|
[
|
|
|
|
("DNA-profilernas", "DNA-profil"),
|
|
|
|
("Elfenbenskustens", "Elfenbenskusten"),
|
|
|
|
("abortmotståndarens", "abortmotståndare"),
|
|
|
|
("kolesterols", "kolesterol"),
|
|
|
|
("portionssnusernas", "portionssnus"),
|
|
|
|
("åsyns", "åsyn"),
|
|
|
|
],
|
|
|
|
)
|
2019-01-16 12:45:50 +00:00
|
|
|
def test_lemmatizer_lookup_assigns(sv_tokenizer, string, lemma):
|
|
|
|
tokens = sv_tokenizer(string)
|
|
|
|
assert tokens[0].lemma_ == lemma
|