mirror of https://github.com/explosion/spaCy.git
* Set heads for test_merge_tokens, to make the test run without models
This commit is contained in:
parent
c107da9738
commit
cc4c335e14
|
@ -1,9 +1,12 @@
|
|||
from __future__ import unicode_literals
|
||||
from spacy.attrs import HEAD
|
||||
import pytest
|
||||
import numpy
|
||||
|
||||
|
||||
@pytest.mark.models
|
||||
def test_merge_tokens(EN):
|
||||
tokens = EN(u'Los Angeles start.')
|
||||
tokens.from_array([HEAD], numpy.asarray([[1, 1, 0, -1]], dtype='int32').T)
|
||||
assert len(tokens) == 4
|
||||
assert tokens[0].head.orth_ == 'Angeles'
|
||||
assert tokens[1].head.orth_ == 'start'
|
||||
|
|
Loading…
Reference in New Issue