From 45166b92c0f72be6e7bb12240e47b33e88891eed Mon Sep 17 00:00:00 2001 From: Rana <45353158+KleinRana@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:44:31 +0200 Subject: [PATCH] Fix bug in wer results on speaker level --- ASR_NL_benchmark/pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ASR_NL_benchmark/pipeline.py b/ASR_NL_benchmark/pipeline.py index 799ebc8..b9cb279 100644 --- a/ASR_NL_benchmark/pipeline.py +++ b/ASR_NL_benchmark/pipeline.py @@ -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