Skip to content

Commit

Permalink
Annotation Helper Download: Output original ids (before preprocessing)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Wolf committed Aug 14, 2024
1 parent 9d5d208 commit 1705cf1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webapp/annotationhelper/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def get_reannotated_df(self):

annotated_df.loc[annotated_df['id'] == record['record_id'], label['label']] = label['value_annotator']

# edit all ids: split on dollar and only take the first part before the last dollar, then split again and remove everything after the last dot
annotated_df['id'] = annotated_df['id'].apply(lambda x: '.'.join('$'.join(x.split('$')[:-1]).split('.')[:-1]))

return annotated_df

def _get_label_type(self, label):
Expand Down

0 comments on commit 1705cf1

Please sign in to comment.