2015-01-30 05:45:45 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from spacy.en import English
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
2015-09-22 00:23:11 +00:00
|
|
|
@pytest.mark.models
|
2015-01-30 05:45:45 +00:00
|
|
|
def test_vec(EN):
|
|
|
|
hype = EN.vocab['hype']
|
|
|
|
assert hype.orth_ == 'hype'
|
2016-12-18 22:31:55 +00:00
|
|
|
assert -0.7 >= hype.vector[0] > -0.8
|
2015-01-30 05:45:45 +00:00
|
|
|
|
2015-04-19 19:39:18 +00:00
|
|
|
|
2015-09-22 00:23:11 +00:00
|
|
|
@pytest.mark.models
|
2015-01-30 05:45:45 +00:00
|
|
|
def test_capitalized(EN):
|
|
|
|
hype = EN.vocab['Hype']
|
|
|
|
assert hype.orth_ == 'Hype'
|
2016-12-18 22:31:55 +00:00
|
|
|
assert -0.7 >= hype.vector[0] > -0.8
|