Skip to content

Evaluation, diagnostics, benchmarks, and additional tests · Evaluation, diagnostics, benchmarks, and additional hypothesis tests · EVA039 · Metric

Word and character error rates

Measure recognition errors after an optimal edit alignment of hypothesis and reference sequences.

Runs in CodeSplash Complete calculation CodeSplash's run and the reference's record

In CodeSplash

A CodeSplash method runs this entry in Python and R. Set it up from the method's page.

Do it in CodeSplash Run it on your own data, in Python or R.

Availability
Runs in CodeSplash
Code example
Complete calculation
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
Verified in Python and R through evaluate.text. The reference's example ran in Python and R here, and they agree.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Measure recognition errors after an optimal edit alignment of hypothesis and reference sequences.

Question / hypotheses

How many substitutions, deletions, and insertions occur per reference word or character?

Architecture / computational structure

A fixed scoring/calibration pipeline applied to model outputs or supplied observations; the formula and usage sections identify its operations.

Assumptions

Transcription conventions, normalization, language segmentation, punctuation, and casing must be fixed. References should include acceptable alternatives when relevant.

Formula / computational definition

WER=(S+D+I)/N;CER=(Sc+Dc+Ic)/Nc.WER=(S+D+I)/N;\qquad CER=(S_c+D_c+I_c)/N_c.

Parameters and notation

N is reference length. Tokenization, normalization, alignment costs, and corpus-versus-utterance aggregation are protocol hyperparameters; there are no learned metric parameters.

Fitting, fine-tuning, and adaptation

There is no model fine-tuning step for this evaluation procedure. Freeze the evaluated systems and evaluator before the final test. Select evaluation settings on development data; if a learned evaluator or calibration model is adapted, use separate fitting data, version it, and reassess its validity.

How to use and calibrate

Use corpus-level error totals, inspect error categories, and resample complete speakers or recordings for uncertainty. Report performance across accents, noise, and recording conditions.

Example application

Compare ASR systems on a speaker-disjoint held-out corpus.

Interpretation / pitfalls

Watch out

WER can exceed 100% because insertions are unbounded. Low WER can conceal critical names or numbers; script-specific segmentation makes cross-language raw comparisons difficult.

Python and R code examples

Scope: Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.

Validation: Python — Executed successfully on synthetic inputs. R — reviewed but not executed in this environment. Python dependencies are explicit imports; R uses base R unless a package/bridge is explicitly named.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.

S,D,I,N=4,2,3,100
print("WER",(S+D+I)/N)  # supplied counts from an edit alignment
R

Complete calculation — Mathematical calculation on synthetic inputs; not a complete benchmark pipeline.

S <- 4; D <- 2; I <- 3; N <- 100
print((S+D+I)/N)

Sources

From the CodeSplash reference, entry EVA039.