2014-09-25 20:29:42 +04:00
|
|
|
"""Test suspected freeing of strings"""
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
2014-12-23 03:40:32 +03:00
|
|
|
from spacy.en import English
|
2014-09-25 20:29:42 +04:00
|
|
|
|
|
|
|
|
2014-12-23 03:40:32 +03:00
|
|
|
@pytest.fixture
|
|
|
|
def EN():
|
|
|
|
return English()
|
|
|
|
|
|
|
|
|
|
|
|
def test_one(EN):
|
|
|
|
tokens = EN('Betty Botter bought a pound of butter.')
|
2015-01-23 23:22:30 +03:00
|
|
|
assert tokens[0].orth_ == 'Betty'
|
2014-12-23 03:40:32 +03:00
|
|
|
tokens2 = EN('Betty also bought a pound of butter.')
|
2015-01-23 23:22:30 +03:00
|
|
|
assert tokens2[0].orth_ == 'Betty'
|
2014-09-25 20:29:42 +04:00
|
|
|
|
|
|
|
|
|
|
|
|