explosion / spacy-streamlit

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

Support for span categorizer? #23

Closed jonmcalder closed 2 years ago

jonmcalder commented 3 years ago

Is it possible to visualize spancat predictions via spacy-streamlit yet? Either directly or by customizing one of the existing visualizers? I haven't been able to find any examples of this.

polm commented 3 years ago

I don't think so. Spancat introduces some hard cases, like crossing annotations or arbitrarily nested spans, that would need a different visualization strategy than NER.

If you have non-overlapping spans or some way to select a non-overlapping subset, you could copy them to doc.ents and use the NER visualization.

jonmcalder commented 3 years ago

Ok thanks. Should this issue remain open for a while in case a solution for this is considered going forward or should it be closed?

polm commented 3 years ago

Yes, it's fine to leave it open as a potential enhancement.

shaked571 commented 2 years ago

I guess you close it now... I saw you also added an example. I implemented it yesterday as well, and I see you just added an example for spans yesterday (it could save me an hour, but that's life)! So, thanks :)

polm commented 2 years ago

Ah, thanks for pointing that out! This feature was added in #37.