* Add test for Issue #214. Resolved in change to Span.root

This commit is contained in:
Matthew Honnibal 2016-01-16 15:37:47 +01:00
parent 42a9f29b40
commit c1039fa4b4
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
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')