mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 12:42:20 +03:00
Test lemma_ with unicode input
This commit is contained in:
parent
2e8d0e5d45
commit
ec25976416
15
tests/test_unicode_lemmas.py
Normal file
15
tests/test_unicode_lemmas.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# encoding=utf8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from spacy.en import English
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def tokens():
|
||||||
|
return English()(u'ćode codé')
|
||||||
|
|
||||||
|
|
||||||
|
def test_unicode(tokens):
|
||||||
|
assert tokens[0].lemma_ == u'ćode'
|
||||||
|
assert tokens[1].lemma_ == u'codé'
|
Loading…
Reference in New Issue
Block a user