Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from time import perf_counter
from typing import List, Optional, Tuple

import jiwer
import editdistance
import pynini
from nemo_text_processing.text_normalization.data_loader_utils import post_process_punct, pre_process
from nemo_text_processing.text_normalization.normalize import Normalizer
Expand Down Expand Up @@ -406,7 +406,7 @@ def calculate_cer(normalized_texts: List[str], pred_text: str, remove_punct=Fals
for punct in "!?:;,.-()*+-/<=>@^_":
text_clean = text_clean.replace(punct, " ").replace(" ", " ")

cer = jiwer.cer(pred_text, text_clean) * 100
cer = editdistance.eval(pred_text, text_clean) * 100.0 / len(pred_text)
normalized_options.append((text, cer, i))
return normalized_options

Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cdifflib
editdistance
inflect
jiwer>2.3.0
joblib
pandas
pynini==2.1.5
Expand Down