mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
c9cd516d96
* Move tests out of package * Fix typo
13 lines
374 B
Python
13 lines
374 B
Python
# coding: utf8
|
|
from __future__ import unicode_literals
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"text,expected_tokens", [("คุณรักผมไหม", ["คุณ", "รัก", "ผม", "ไหม"])]
|
|
)
|
|
def test_th_tokenizer(th_tokenizer, text, expected_tokens):
|
|
tokens = [token.text for token in th_tokenizer(text)]
|
|
assert tokens == expected_tokens
|