mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Add xfailing test for #3288
This commit is contained in:
parent
c5476bd75b
commit
c32290557f
20
spacy/tests/regression/test_issue3288.py
Normal file
20
spacy/tests/regression/test_issue3288.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
import numpy
|
||||||
|
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."""
|
||||||
|
words = ["Hello", "World", "!", "When", "is", "this", "breaking", "?"]
|
||||||
|
heads = [1, 0, -1, 1, 0, 1, -2, -3]
|
||||||
|
deps = ["intj", "ROOT", "punct", "advmod", "ROOT", "det", "nsubj", "punct"]
|
||||||
|
doc = get_doc(en_vocab, words=words, heads=heads, deps=deps)
|
||||||
|
doc.tensor = numpy.zeros(96, dtype="float32")
|
||||||
|
displacy.render(doc)
|
Loading…
Reference in New Issue
Block a user