mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
5ca0dbae76
* Add support basic support for lower sorbian. * Add some test for dsb. * Update spacy/lang/dsb/examples.py Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
26 lines
560 B
Python
26 lines
560 B
Python
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"text,match",
|
|
[
|
|
("10", True),
|
|
("1", True),
|
|
("10,000", True),
|
|
("10,00", True),
|
|
("jadno", True),
|
|
("dwanassćo", True),
|
|
("milion", True),
|
|
("sto", True),
|
|
("ceła", False),
|
|
("kopica", False),
|
|
("narěcow", False),
|
|
(",", False),
|
|
("1/2", True),
|
|
],
|
|
)
|
|
def test_lex_attrs_like_number(dsb_tokenizer, text, match):
|
|
tokens = dsb_tokenizer(text)
|
|
assert len(tokens) == 1
|
|
assert tokens[0].like_num == match
|