mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
16 lines
675 B
Python
16 lines
675 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
|