Skip to content

Commit

Permalink
Merge pull request #5 from opensource-spraakherkenning-nl/KleinRana-f…
Browse files Browse the repository at this point in the history
…ix-speaker-bug

Fix bug in wer results on speaker level
  • Loading branch information
KleinRana authored Oct 5, 2023
2 parents 32ad4d5 + 45166b9 commit bf59bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ASR_NL_benchmark/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def calculate_wer_per_cat(df,category='category', id='', kind=False):
1 banaan 2 0.40 False
"""
df_out = df.groupby('category', as_index=False).agg({'ref_words': 'sum', 'product': 'sum'})
df_out = df.groupby(category, as_index=False).agg({'ref_words': 'sum', 'product': 'sum'})
df_out['WER'] = (df_out['product'] / df_out['ref_words']).round(2)
df_out = df_out.drop('product', 1)
df_out['kind'] = kind
Expand Down

0 comments on commit bf59bfa

Please sign in to comment.