mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
* Move test for doc.merge to tokens_api file, to avoid name conflicts which upset pytest
This commit is contained in:
parent
34a157511f
commit
4e2253170c
|
@ -1,14 +0,0 @@
|
||||||
from __future__ import unicode_literals
|
|
||||||
from spacy.en import English
|
|
||||||
import numpy as np
|
|
||||||
from spacy.attrs import HEAD
|
|
||||||
|
|
||||||
|
|
||||||
def test_merge_hang():
|
|
||||||
text = 'through North and South Carolina'
|
|
||||||
EN = English(parser=False)
|
|
||||||
doc = EN(text, tag=True)
|
|
||||||
heads = np.asarray([[0, 3, -1, -2, -4]], dtype='int32')
|
|
||||||
doc.from_array([HEAD], heads.T)
|
|
||||||
doc.merge(18, 32, '', '', 'ORG')
|
|
||||||
doc.merge(8, 32, '', '', 'ORG')
|
|
Loading…
Reference in New Issue
Block a user