* Merge train.py

This commit is contained in:
Matthew Honnibal 2015-02-04 14:16:14 -05:00
parent 3a302ae6f2
commit d81b7be6a2
2 changed files with 16 additions and 0 deletions

View File

@ -84,6 +84,7 @@ cdef int fill_context(atom_t* context, State* state) except -1:
if state.stack_len >= 3:
context[S2_has_head] = has_head(get_s2(state))
unigrams = (
(S2W, S2p),
(S2c6, S2p),

15
tests/test_token.py Normal file
View File

@ -0,0 +1,15 @@
from __future__ import unicode_literals
import pytest
from spacy.en import English
from spacy.parts_of_speech import ADV
@pytest.fixture
def nlp():
return English()
def test_prob(nlp):
tokens = nlp(u'Give it back')
give = tokens[0]
assert give.prob != 0