explosion / spacy-streamlit

👑 spaCy building blocks and visualizers for Streamlit apps
https://share.streamlit.io/ines/spacy-streamlit-demo/master/app.py
MIT License
794 stars 114 forks source link

`visualize_ner()` does not remove duplicate labels for spans. #40

Closed narayanacharya6 closed 2 years ago

narayanacharya6 commented 2 years ago

I think the issue is best illustrated using a picture:

image

So my doc has multiple spans with label LOC or ORG. I would expect the selector component here only show me these two values. However, looking at the code for visualize_ner() I see we do not remove duplicates from labels for different spans. I am not sure if this has been there all along or something changed with recent versions of streamlit.

I am using the following version of the packages:

spacy-streamlit           1.0.4
streamlit                 1.12.0