Spaces:
Sleeping
Sleeping
fix jiwer error
Browse files
app.py
CHANGED
|
@@ -24,8 +24,8 @@ def calculate_sentence_wer(reference, hypothesis):
|
|
| 24 |
"""
|
| 25 |
Calculate WER for each sentence and overall statistics.
|
| 26 |
"""
|
| 27 |
-
reference_sentences =
|
| 28 |
-
hypothesis_sentences =
|
| 29 |
|
| 30 |
if len(reference_sentences) != len(hypothesis_sentences):
|
| 31 |
raise ValueError("Reference and hypothesis must contain the same number of sentences")
|
|
|
|
| 24 |
"""
|
| 25 |
Calculate WER for each sentence and overall statistics.
|
| 26 |
"""
|
| 27 |
+
reference_sentences = reference.split()
|
| 28 |
+
hypothesis_sentences = hypothesis.split()
|
| 29 |
|
| 30 |
if len(reference_sentences) != len(hypothesis_sentences):
|
| 31 |
raise ValueError("Reference and hypothesis must contain the same number of sentences")
|