Why does displacy only support showing one span key?
Open
enhancement
feat / doc
feat / visualizers
- Dominant language
- Python
- Stars
- 33.9k
- Forks
- 4.7k
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
As the span group is meant to support different groups of spans, would be more useful to enable displacy supporting other span keys at the same time?
```
import spacy
from spacy import displacy
from spacy.tokens import Span
text = "Welcome to the Bank of China."
nlp = spacy.blank("en")
doc = nlp(text)
doc.spans["dc"] = [
Span(doc, 3, 6, "ORG")
]
doc.spans["sc"] = [
Span(doc, 5, 6, "GPE"),
]
displacy.render(doc, style="span")
```
Contributor guide
Assessment
This issue has not been assessed yet.