spaCy/tests/tokens/test_token.py

17 lines
275 B
Python
Raw Normal View History

2015-02-04 22:16:14 +03:00
from __future__ import unicode_literals
import pytest
from spacy.en import English
from spacy.parts_of_speech import ADV
2015-04-19 22:39:18 +03:00
2015-02-04 22:16:14 +03:00
@pytest.fixture
def nlp():
return English()
def test_prob(nlp):
tokens = nlp(u'Give it back')
give = tokens[0]
assert give.prob != 0