Skip to content

Commit

Permalink
Merge pull request #1 from opensource-spraakherkenning-nl/KleinRana-p…
Browse files Browse the repository at this point in the history
…atch-1

Bug fix concerning renaming field weighted Wer to WER
  • Loading branch information
KleinRana authored Oct 4, 2023
2 parents d69a866 + 87120cf commit 141dcdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ASR_NL_benchmark/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_dfs():
dfs[index]['cat']['df'] = pandas.read_csv(folder)
dfs[index]['cat']['kind'] = dfs[index]['cat']['df']['kind'].iloc[0]
dfs[index]['cat']['df'] = dfs[index]['cat']['df'].drop('kind',1)
dfs[index]['cat']['df']['product'] = dfs[index]['cat']['df']['Weighted_wer'] * dfs[index]['cat']['df']['ref_words']
dfs[index]['cat']['df']['product'] = dfs[index]['cat']['df']['WER'] * dfs[index]['cat']['df']['ref_words']
dfs[index]['cat']['wer'] = dfs[index]['cat']['df']['product'].sum() / dfs[index]['cat']['df']['ref_words'].sum()
dfs[index]['cat']['df'] = dfs[index]['cat']['df'].drop('product',1)
print(dfs)
Expand All @@ -83,7 +83,7 @@ def get_dfs():
dfs[index]['spk']['kind'] = dfs[index]['spk']['df']['kind'].iloc[0]
dfs[index]['spk']['df'] = dfs[index]['spk']['df'].drop('kind', 1)

dfs[index]['spk']['df']['product'] = dfs[index]['spk']['df']['Weighted_wer'] * dfs[index]['spk']['df'][
dfs[index]['spk']['df']['product'] = dfs[index]['spk']['df']['WER'] * dfs[index]['spk']['df'][
'ref_words']
dfs[index]['spk']['wer'] = dfs[index]['spk']['df']['product'].sum() / dfs[index]['spk']['df']['ref_words'].sum()
dfs[index]['spk']['df'] = dfs[index]['spk']['df'].drop('product', 1)
Expand Down

0 comments on commit 141dcdd

Please sign in to comment.