mirror of https://github.com/explosion/spaCy.git
* Merge train.py
This commit is contained in:
parent
3a302ae6f2
commit
d81b7be6a2
|
@ -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),
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue