spaCy/tests/test_string_loading.py

19 lines
386 B
Python
Raw Normal View History

2014-09-25 16:29:42 +00:00
"""Test suspected freeing of strings"""
from __future__ import unicode_literals
import pytest
from spacy.en import English
2014-09-25 16:29:42 +00:00
@pytest.fixture
def EN():
return English()
def test_one(EN):
tokens = EN('Betty Botter bought a pound of butter.')
assert tokens[0].orth_ == 'Betty'
tokens2 = EN('Betty also bought a pound of butter.')
assert tokens2[0].orth_ == 'Betty'