2014-07-07 02:23:46 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2014-08-30 18:36:06 +00:00
|
|
|
from spacy.en import EN
|
2014-07-07 02:23:46 +00:00
|
|
|
from spacy.util import utf8open
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
import os
|
|
|
|
from os import path
|
|
|
|
|
|
|
|
|
|
|
|
HERE = path.dirname(__file__)
|
|
|
|
|
2014-07-07 03:11:04 +00:00
|
|
|
|
2014-07-07 02:23:46 +00:00
|
|
|
@pytest.fixture
|
|
|
|
def sun_txt():
|
|
|
|
loc = path.join(HERE, 'sun.txt')
|
|
|
|
return utf8open(loc).read()
|
|
|
|
|
|
|
|
|
|
|
|
def test_tokenize(sun_txt):
|
|
|
|
assert len(sun_txt) != 0
|
2014-08-30 18:36:06 +00:00
|
|
|
tokens = EN.tokenize(sun_txt)
|
2014-07-07 02:23:46 +00:00
|
|
|
assert True
|