explosion/spacy-streamlit

Support for span categorizer?

jonmcalder opened this issue · 5 comments

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

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.

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

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

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

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