2022-08-22 13:04:30 +03:00
|
|
|
import pytest
|
2021-06-11 11:19:22 +03:00
|
|
|
from spacy.tokens import Doc
|
|
|
|
|
|
|
|
|
2022-08-22 13:04:30 +03:00
|
|
|
pytestmark = pytest.mark.filterwarnings("ignore::DeprecationWarning")
|
|
|
|
|
|
|
|
|
2021-06-11 11:19:22 +03:00
|
|
|
def test_uk_lemmatizer(uk_lemmatizer):
|
|
|
|
"""Check that the default uk lemmatizer runs."""
|
|
|
|
doc = Doc(uk_lemmatizer.vocab, words=["a", "b", "c"])
|
|
|
|
uk_lemmatizer(doc)
|
2022-10-12 13:18:39 +03:00
|
|
|
assert [token.lemma for token in doc]
|
|
|
|
|
|
|
|
|
|
|
|
def test_uk_lookup_lemmatizer(uk_lookup_lemmatizer):
|
|
|
|
"""Check that the lookup uk lemmatizer runs."""
|
|
|
|
doc = Doc(uk_lookup_lemmatizer.vocab, words=["a", "b", "c"])
|
|
|
|
uk_lookup_lemmatizer(doc)
|
|
|
|
assert [token.lemma for token in doc]
|