cahya commited on
Commit
6f9beef
1 Parent(s): 912bc99

updated the eval script with the result

Browse files
eval.py CHANGED
@@ -50,9 +50,12 @@ def log_results(result: Dataset, args: Dict[str, str]):
50
  def normalize_text(text: str) -> str:
51
  """DO ADAPT FOR YOUR USE CASE. this function normalizes the target text."""
52
 
53
- chars_to_ignore_regex = '[,?.!\-\;\:"“%‘”�—’…–]' # noqa: W605 IMPORTANT: this should correspond to the chars that were ignored during training
54
 
55
  text = re.sub(chars_to_ignore_regex, "", text.lower())
 
 
 
56
 
57
  # In addition, we can normalize the target text, e.g. removing new lines characters etc...
58
  # note that order is important here!
50
  def normalize_text(text: str) -> str:
51
  """DO ADAPT FOR YOUR USE CASE. this function normalizes the target text."""
52
 
53
+ chars_to_ignore_regex = '[,?.!-;:""%\'"�\'‘’_,!łńō–—\\\\\\“”\\[\\]]'
54
 
55
  text = re.sub(chars_to_ignore_regex, "", text.lower())
56
+ text = re.sub(r'[‘’´`]', r"'", text)
57
+ text = re.sub(r'è', r"é", text)
58
+ text = re.sub(r"(-|' | '| +)", " ", text)
59
 
60
  # In addition, we can normalize the target text, e.g. removing new lines characters etc...
61
  # note that order is important here!
log_mozilla-foundation_common_voice_7_0_id_test_predictions.txt ADDED
The diff for this file is too large to render. See raw diff
log_mozilla-foundation_common_voice_7_0_id_test_targets.txt ADDED
The diff for this file is too large to render. See raw diff
mozilla-foundation_common_voice_7_0_id_test_eval_results.txt ADDED
@@ -0,0 +1,2 @@
 
 
1
+ WER: 0.04492122024807241
2
+ CER: 0.015773881015293457