spaCy/tests/test_wiki_sun.py

24 lines
392 B
Python
Raw Normal View History

from __future__ import unicode_literals
2014-12-23 02:18:59 +00:00
from spacy.en import English
from spacy.util import utf8open
import pytest
from os import path
HERE = path.dirname(__file__)
2014-07-07 03:11:04 +00:00
@pytest.fixture
def sun_txt():
loc = path.join(HERE, 'sun.txt')
return utf8open(loc).read()
def test_tokenize(sun_txt):
2014-12-30 10:34:09 +00:00
nlp = English()
assert len(sun_txt) != 0
2014-12-23 02:18:59 +00:00
tokens = nlp(sun_txt)
assert True