explosion--spacy
f877c37fc6
tests / Test (windows-latest, 3.13) (push) Has been cancelled
tests / Test (windows-latest, 3.14) (push) Has been cancelled
tests / Validate (push) Has been cancelled
tests / Test (macos-latest, 3.10) (push) Has been cancelled
tests / Test (macos-latest, 3.11) (push) Has been cancelled
tests / Test (macos-latest, 3.12) (push) Has been cancelled
tests / Test (macos-latest, 3.13) (push) Has been cancelled
tests / Test (macos-latest, 3.14) (push) Has been cancelled
tests / Test (ubuntu-latest, 3.10) (push) Has been cancelled
tests / Test (ubuntu-latest, 3.11) (push) Has been cancelled
tests / Test (ubuntu-latest, 3.12) (push) Has been cancelled
tests / Test (ubuntu-latest, 3.13) (push) Has been cancelled
tests / Test (ubuntu-latest, 3.14) (push) Has been cancelled
tests / Test (windows-latest, 3.10) (push) Has been cancelled
tests / Test (windows-latest, 3.11) (push) Has been cancelled
tests / Test (windows-latest, 3.12) (push) Has been cancelled
universe validation / Validate (push) Has been cancelled
32 行
817 B
Python
32 行
817 B
Python
import pytest
|
|
|
|
SQ_BASIC_TOKENIZATION_TESTS = [
|
|
(
|
|
"Askush nuk mund t’i nënshtrohet torturës ose dënimeve ose "
|
|
"trajtimeve çnjerëzore ose poshtëruese.",
|
|
[
|
|
"Askush",
|
|
"nuk",
|
|
"mund",
|
|
"t’i",
|
|
"nënshtrohet",
|
|
"torturës",
|
|
"ose",
|
|
"dënimeve",
|
|
"ose",
|
|
"trajtimeve",
|
|
"çnjerëzore",
|
|
"ose",
|
|
"poshtëruese",
|
|
".",
|
|
],
|
|
),
|
|
]
|
|
|
|
|
|
@pytest.mark.parametrize("text,expected_tokens", SQ_BASIC_TOKENIZATION_TESTS)
|
|
def test_sq_tokenizer_basic(sq_tokenizer, text, expected_tokens):
|
|
tokens = sq_tokenizer(text)
|
|
token_list = [token.text for token in tokens if not token.is_space]
|
|
assert expected_tokens == token_list
|