mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 20:28:20 +03:00
80fb1bffc9
* minor ordinal number addition * fixed typo * added corresponding lexical test
30 lines
566 B
Python
30 lines
566 B
Python
import pytest
|
||
from spacy.lang.tr.lex_attrs import like_num
|
||
|
||
|
||
@pytest.mark.parametrize(
|
||
"word",
|
||
[
|
||
"bir",
|
||
"iki",
|
||
"dört",
|
||
"altı",
|
||
"milyon",
|
||
"100",
|
||
"birinci",
|
||
"üçüncü",
|
||
"beşinci",
|
||
"100üncü",
|
||
"8inci"
|
||
]
|
||
)
|
||
def test_tr_lex_attrs_like_number_cardinal_ordinal(word):
|
||
assert like_num(word)
|
||
|
||
|
||
@pytest.mark.parametrize("word", ["beş", "yedi", "yedinci", "birinci"])
|
||
def test_tr_lex_attrs_capitals(word):
|
||
assert like_num(word)
|
||
assert like_num(word.upper())
|
||
|