CharacterErrorRate

Models & Types · AiDotNet.Metrics

Character Error Rate (CER) metric for speech recognition and OCR evaluation.

How It Works

CER is similar to WER but operates at the character level rather than word level. It’s particularly useful for languages without clear word boundaries or for OCR evaluation.

Formula: CER = (Substitutions + Insertions + Deletions) / Number of characters in reference

Constructors

Constructor Summary
CharacterErrorRate()

Methods

Method Summary
double Compute(string hypothesis, string reference, bool ignoreWhitespace) Computes the Character Error Rate between a hypothesis and reference.
double ComputeBatch(string[] hypotheses, string[] references, bool ignoreWhitespace) Computes CER for a batch of hypothesis-reference pairs.