Mariusz Kossakowski commited on
Commit
3362a6a
·
1 Parent(s): 802f11a

Filtering fix

Browse files
clarin_datasets/kpwr_ner_datasets.py CHANGED
@@ -127,11 +127,11 @@ class KpwrNerDataset(DatasetToShow):
127
  )
128
  full_df_unzipped = full_df_unzipped.loc[
129
  (full_df_unzipped["ner"] != "O")
130
- & (full_df_unzipped["ner"].str.starstwith("I-"))
131
- ]
132
  possible_options = sorted(full_df_unzipped["ner"].unique())
133
  with most_common_tokens:
134
- st.header("10 most common tokens from selected class (without 'O')")
135
  selected_class = st.selectbox(
136
  label="Select class to show", options=possible_options
137
  )
 
127
  )
128
  full_df_unzipped = full_df_unzipped.loc[
129
  (full_df_unzipped["ner"] != "O")
130
+ & ~(full_df_unzipped["ner"].str.startswith("I-"))
131
+ ]
132
  possible_options = sorted(full_df_unzipped["ner"].unique())
133
  with most_common_tokens:
134
+ st.header("10 most common tokens from selected class (without 'O' and 'I-*')")
135
  selected_class = st.selectbox(
136
  label="Select class to show", options=possible_options
137
  )