This commit is contained in:
Matthew Honnibal 2019-02-21 09:48:53 +01:00 committed by GitHub
parent a137e8b418
commit 80195bc2d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -8,7 +8,6 @@ from spacy import displacy
from ..util import get_doc
@pytest.mark.xfail
def test_issue3288(en_vocab):
"""Test that retokenization works correctly via displaCy when punctuation
is merged onto the preceeding token and tensor is resized."""

View File

@ -222,7 +222,7 @@ def _bulk_merge(Doc doc, merges):
# whether the row is to be deleted, then use numpy.delete
if doc.tensor is not None and doc.tensor.size != 0:
doc.tensor = _resize_tensor(doc.tensor,
[(m[1][0].start, m[1][0].end) for m in merges])
[(m[0].start, m[0].end) for m in merges])
# Memorize span roots and sets dependencies of the newly merged
# tokens to the dependencies of their roots.
span_roots = []