Skip to content

Commit

Permalink
Added who_participates column
Browse files Browse the repository at this point in the history
  • Loading branch information
akoziol98 committed Mar 14, 2024
1 parent d3c06cd commit f47e5aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChildProject/pipelines/conversationFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def who_initiated(annotations: pd.DataFrame):
def who_finished(annotations: pd.DataFrame):
return annotations.reset_index().iloc[-1]['speaker_type']

@conversationFunction()
def who_participates(annotations: pd.DataFrame):
return annotations.reset_index()['speaker_type'].unique()

@conversationFunction()
def total_duration_of_vocalisations(annotations: pd.DataFrame):
Expand Down
1 change: 1 addition & 0 deletions ChildProject/pipelines/conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ def __init__(
["vocalisations_count", "vocalisations_count", pd.NA],
["who_initiated", "initiator", pd.NA],
["who_finished", "finisher", pd.NA],
["who_participates", "participators", pd.NA],
["total_duration_of_vocalisations", "total_duration_of_vocalisations", pd.NA],
["conversation_duration", "conversation_duration", pd.NA],
["is_speaker", "CHI_present", 'CHI'],
Expand Down

0 comments on commit f47e5aa

Please sign in to comment.