mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-13 21:26:58 +03:00
60e10a9f93
* Serbian stopwords added. (cyrillic alphabet) * spaCy Contribution agreement included. * Test initialize updated * Serbian language code update. --bugfix * Tokenizer exceptions added. Init file updated. * Norm exceptions and lexical attributes added. * Examples added. * Tests added. * sr_lang examples update. * Tokenizer exceptions updated. (Serbian)
15 lines
531 B
Python
15 lines
531 B
Python
# coding: utf-8
|
||
from __future__ import unicode_literals
|
||
|
||
import pytest
|
||
|
||
|
||
@pytest.mark.parametrize(
|
||
"text,norms,lemmas",
|
||
[("о.г.", ["ове године"], ["ова година"]), ("чет.", ["четвртак"], ["четвртак"]),
|
||
("гђа", ["госпођа"], ["госпођа"]), ("ил'", ["или"], ["или"])])
|
||
def test_sr_tokenizer_abbrev_exceptions(sr_tokenizer, text, norms, lemmas):
|
||
tokens = sr_tokenizer(text)
|
||
assert len(tokens) == 1
|
||
assert [token.norm_ for token in tokens] == norms
|