def test_displacy_spans(en_vocab):
    'Test that displaCy can render Spans.'
    doc = Doc(en_vocab, words=['But', 'Google', 'is', 'starting', 'from', 'behind'])
    doc.ents = [Span(doc, 1, 2, label=doc.vocab.strings['ORG'])]
    html = displacy.render(doc[1:4], style='ent')
    assert html.startswith('<div')
Test that displaCy can render Spans.
def test_displacy_spans(en_vocab):
    
    doc = Doc(en_vocab, words=['But', 'Google', 'is', 'starting', 'from', 'behind'])
    doc.ents = [Span(doc, 1, 2, label=doc.vocab.strings['ORG'])]
    html = displacy.render(doc[1:4], style='ent')
    assert html.startswith('<div')