Skip to content

Commit

Permalink
make backwards compatible by having ? and nan in actor analysis as well
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Tjong Kim Sang <[email protected]>
  • Loading branch information
ThijsVroegh and eriktks committed Jul 16, 2024
1 parent 14bf5eb commit 98439a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orangecontrib/storynavigation/modules/actoranalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def __do_custom_tagging(self, df, cust_tag_cols):

for index, row in df_filtered.iterrows():
current_row_ents = []
for col in cust_tag_cols:
if not pd.isna(row[col]) and (row[col] != '?'): # was '!= 'nan'
for col in cust_tag_cols:
if not pd.isna(row[col]) and (row[col] not in ['?', 'nan']):
current_row_ents.append({"start": int(row['token_start_idx']), "end": int(row['token_end_idx']), "label": row[col]})

# Convert each dictionary to a tuple of (key, value) pairs
Expand Down

0 comments on commit 98439a3

Please sign in to comment.