From d82241218a5b8240e0072b1c1ad92b61275d7f71 Mon Sep 17 00:00:00 2001 From: adrianeboyd Date: Wed, 2 Oct 2019 12:05:17 +0200 Subject: [PATCH] Make the default NER labels less model-specific [ci skip] (#4361) --- examples/streamlit_spacy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/streamlit_spacy.py b/examples/streamlit_spacy.py index f99f7bf18..fd27ec0ec 100644 --- a/examples/streamlit_spacy.py +++ b/examples/streamlit_spacy.py @@ -78,9 +78,8 @@ if "parser" in nlp.pipe_names: if "ner" in nlp.pipe_names: st.header("Named Entities") st.sidebar.header("Named Entities") - default_labels = ["PERSON", "ORG", "GPE", "LOC"] labels = st.sidebar.multiselect( - "Entity labels", nlp.get_pipe("ner").labels, default_labels + "Entity labels", nlp.get_pipe("ner").labels, nlp.get_pipe("ner").labels ) html = displacy.render(doc, style="ent", options={"ents": labels}) # Newlines seem to mess with the rendering