spaCy/spacy/tests/tokenizer/test_tokens_from_list.py

10 lines
235 B
Python
Raw Normal View History

2014-11-12 15:24:32 +03:00
from __future__ import unicode_literals
import pytest
2014-11-12 15:24:32 +03:00
def test1(en_tokenizer):
2014-11-12 15:24:32 +03:00
words = ['JAPAN', 'GET', 'LUCKY']
tokens = en_tokenizer.tokens_from_list(words)
2014-11-12 15:24:32 +03:00
assert len(tokens) == 3
assert tokens[0].orth_ == 'JAPAN'