akki2825 commited on
Commit
c3a361b
·
verified ·
1 Parent(s): af4ff35

fix jiwer error

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = jiwer.split_into_sentences(reference)
28
- hypothesis_sentences = jiwer.split_into_sentences(hypothesis)
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")